Skip to content

Commit 4cfc15b

Browse files
Website refactor (#108)
1 parent 280990b commit 4cfc15b

94 files changed

Lines changed: 1217 additions & 43373 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.git
2+
.github
3+
.bundle
4+
vendor
5+
_site
6+
.jekyll-metadata
7+
.jekyll-cache
8+
Gemfile.lock

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ jobs:
2424

2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@v3
27+
uses: actions/checkout@v7
2828

2929
- name: Initialize CodeQL
30-
uses: github/codeql-action/init@v2
30+
uses: github/codeql-action/init@v4
3131
with:
3232
languages: ${{ matrix.language }}
3333
queries: +security-and-quality
3434

3535
- name: Autobuild
36-
uses: github/codeql-action/autobuild@v2
36+
uses: github/codeql-action/autobuild@v4
3737

3838
- name: Perform CodeQL Analysis
39-
uses: github/codeql-action/analyze@v2
39+
uses: github/codeql-action/analyze@v4
4040
with:
4141
category: "/language:${{ matrix.language }}"

.github/workflows/jekyll.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,24 @@ jobs:
3232
runs-on: ubuntu-22.04
3333
steps:
3434
- name: Checkout
35-
uses: actions/checkout@v4
35+
uses: actions/checkout@v7
3636
- name: Setup Ruby
37-
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
37+
uses: ruby/setup-ruby@003a5c4d8d6321bd302e38f6f0ec593f77f06600 # v1.319.0
3838
with:
3939
ruby-version: '3.1' # Not needed with a .ruby-version file
4040
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
4141
cache-version: 0 # Increment this number if you need to re-download cached gems
4242
- name: Setup Pages
4343
id: pages
44-
uses: actions/configure-pages@v5
44+
uses: actions/configure-pages@v6
4545
- name: Build with Jekyll
4646
# Outputs to the './_site' directory by default
4747
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
4848
env:
4949
JEKYLL_ENV: production
5050
- name: Upload artifact
5151
# Automatically uploads an artifact from the './_site' directory by default
52-
uses: actions/upload-pages-artifact@v3
52+
uses: actions/upload-pages-artifact@v5
5353

5454
# Deployment job
5555
deploy:
@@ -61,4 +61,4 @@ jobs:
6161
steps:
6262
- name: Deploy to GitHub Pages
6363
id: deployment
64-
uses: actions/deploy-pages@v4
64+
uses: actions/deploy-pages@v5

Dockerfile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Dockerfile to build and preview the GeoNode Jekyll website locally.
2+
#
3+
# Build the image:
4+
# docker build -t geonode-site .
5+
#
6+
# Preview at http://localhost:4000:
7+
# docker run --rm -p 4000:4000 geonode-site
8+
#
9+
# Live-reload while editing (mount the working tree):
10+
# docker run --rm -p 4000:4000 -v "$PWD":/site geonode-site
11+
#
12+
# Build only, writing the static site to ./_site (no server):
13+
# docker run --rm -v "$PWD":/site geonode-site bundle exec jekyll build
14+
15+
FROM ruby:3.3-slim
16+
17+
# System packages required to build native gem extensions (nokogiri, ffi, ...)
18+
RUN apt-get update \
19+
&& apt-get install -y --no-install-recommends \
20+
build-essential \
21+
git \
22+
&& rm -rf /var/lib/apt/lists/*
23+
24+
# Install gems from a directory OUTSIDE the site tree, and point Bundler at it.
25+
# This way, bind-mounting the working tree over /site for live-reload cannot
26+
# shadow the Gemfile/Gemfile.lock, nor make Bundler resolve against a stale
27+
# host Gemfile.lock. Gems live in /usr/local/bundle (the base image default).
28+
ENV BUNDLE_GEMFILE=/deps/Gemfile
29+
WORKDIR /deps
30+
COPY Gemfile ./
31+
RUN gem install bundler \
32+
&& bundle install
33+
34+
# Site content. Bundler still reads the Gemfile from /deps (BUNDLE_GEMFILE),
35+
# so the copied/mounted files here are treated purely as Jekyll sources.
36+
WORKDIR /site
37+
COPY . .
38+
39+
EXPOSE 4000
40+
41+
# --host 0.0.0.0 so the server is reachable from the host; --force_polling
42+
# makes live-reload work reliably with mounted volumes.
43+
CMD ["bundle", "exec", "jekyll", "serve", \
44+
"--host", "0.0.0.0", \
45+
"--port", "4000", \
46+
"--force_polling"]

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ source "https://rubygems.org"
44

55
# gem "rails"
66

7-
gem "github-pages", "~> 231", group: :jekyll_plugins
7+
gem "github-pages", "~> 232", group: :jekyll_plugins
88
gem "webrick", "~> 1.8"

README.md

Lines changed: 108 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,110 @@
11
# geonode.org
22

3-
Prerequisites
4-
-------------
5-
sudo apt-get install ruby-full build-essential zlib1g-dev
6-
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
7-
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
8-
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
9-
source ~/.bashrc
10-
gem install bundler
11-
bundle install
12-
13-
Workflow
14-
--------
15-
16-
# edit content
17-
bundle exec jekyll serve # default port is 4000, set explicitly with -P
18-
# view at http://localhost:4000
19-
# adding blogposts
20-
cd _drafts
21-
vi newpost.md
22-
# make sure to set the following YAML front matter:
23-
# layout: base
24-
#
25-
# preview with `jekyll build --drafts` or `jekyll serve --drafts` and draft will show up as latest post
26-
# when you are ready to publish:
27-
# - rename the file as per the current YYYY-MM-DD
28-
git mv _drafts/newpost.md _posts/YYYY-MM-DD-newpost.md
29-
vi _posts/YYYY-MM-DD-newpost.md
30-
# commit and push
31-
bundle exec jekyll build
32-
git commit -m 'publish article'
33-
git push origin master
3+
Source for the [GeoNode](https://geonode.org) project website, a static site built with [Jekyll](https://jekyllrb.com/) and served at [geonode.org](https://geonode.org).
4+
5+
## How it's published
6+
7+
The site is built and deployed automatically by GitHub Actions (`.github/workflows/jekyll.yml`): every push to the `master` branch runs `jekyll build` and deploys the result to GitHub Pages. There is no manual publish step — merging to `master` is what ships the site.
8+
9+
The build uses the gems pinned in this repo's `Gemfile`. The site tracks the [`github-pages`](https://github.com/github/pages-gem) gem, which keeps Jekyll and its plugins aligned with what GitHub Pages supports (currently Jekyll 3.x).
10+
11+
## Local development
12+
13+
You can run the site either with Docker (no Ruby toolchain needed on your machine) or with a native Ruby setup.
14+
15+
### Option A — Docker (recommended)
16+
17+
Build the image once:
18+
19+
```bash
20+
docker build -t geonode-site .
21+
```
22+
23+
Serve the site at <http://localhost:4000>:
24+
25+
```bash
26+
docker run --rm -p 4000:4000 geonode-site
27+
```
28+
29+
Serve with live-reload while editing, by mounting the working tree:
30+
31+
```bash
32+
docker run --rm -p 4000:4000 -v "$PWD":/site geonode-site
33+
```
34+
35+
Build only and extract the generated static site to `./_site` (no server):
36+
37+
```bash
38+
docker run --rm -v "$PWD":/site geonode-site bundle exec jekyll build
39+
```
40+
41+
> On Linux/WSL the generated files are owned by `root`. To have them owned by
42+
> your user, add `--user "$(id -u):$(id -g)"` to the `docker run` command.
43+
44+
### Option B — Native Ruby
45+
46+
Install the prerequisites (Debian/Ubuntu example):
47+
48+
```bash
49+
sudo apt-get install ruby-full build-essential zlib1g-dev
50+
```
51+
52+
If gems fail to install globally, install them under your home directory:
53+
54+
```bash
55+
echo '# Install Ruby gems to ~/gems' >> ~/.bashrc
56+
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
57+
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
58+
source ~/.bashrc
59+
```
60+
61+
Install the project gems and serve the site:
62+
63+
```bash
64+
gem install bundler
65+
bundle install
66+
bundle exec jekyll serve # default port 4000; override with -P <port>
67+
```
68+
69+
View at <http://localhost:4000>.
70+
71+
## Writing a blog post
72+
73+
Drafts live in `_drafts/` and are excluded from production builds.
74+
75+
1. Create the draft and set its YAML front matter:
76+
77+
```bash
78+
cd _drafts
79+
vi newpost.md
80+
```
81+
82+
```yaml
83+
---
84+
layout: base
85+
---
86+
```
87+
88+
2. Preview drafts (they show up as the latest post):
89+
90+
```bash
91+
bundle exec jekyll serve --drafts
92+
# or, with Docker:
93+
docker run --rm -p 4000:4000 -v "$PWD":/site geonode-site \
94+
bundle exec jekyll serve --host 0.0.0.0 --drafts
95+
```
96+
97+
3. When ready to publish, move the draft into `_posts/` with a dated filename:
98+
99+
```bash
100+
git mv _drafts/newpost.md _posts/YYYY-MM-DD-newpost.md
101+
vi _posts/YYYY-MM-DD-newpost.md
102+
```
103+
104+
4. Commit and push to `master` — the GitHub Actions workflow builds and
105+
deploys the site automatically:
106+
107+
```bash
108+
git commit -am 'publish article'
109+
git push origin master
110+
```

_config.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,9 @@ defaults:
2121
layout: 'base.html'
2222

2323
gems:
24-
#- jekyll-feed
2524
- jekyll-mentions
2625
- jekyll-sitemap
2726

28-
#feed:
29-
# path: blog/feed.xml
30-
3127
exclude: [README.md, vendor, LICENSE.txt, CNAME]
3228

3329
# Markdown Configuration
@@ -45,7 +41,7 @@ extbase:
4541

4642
dns_prefetch: ['//www.google-analytics.com', '//fonts.googleapis.com']
4743

48-
fonts: ['Lato:300,400,700', 'Inconsolata']
44+
# Fonts are loaded directly in _layouts/base.html (Google Fonts css2 API).
4945

5046
keywords:
5147
- GeoNode

_includes/footer.html

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
1-
<footer class="footer">
1+
<footer class="gn-footer">
22
<div class="container">
33
{% if important_links %}
44
{% include important_links.html %}
55
{% endif %}
66

7-
<section class="btm">
8-
<div class="row">
9-
<div class="col-md-10">
10-
<p class="text-start">This <a href="http://github.com/geonode/geonode.github.com/" target="_blank">Website</a> is licensed <a href='https://github.com/GeoNode/geonode/blob/master/license.txt'>CC by SA</a>. - <a href='https://github.com/GeoNode/geonode/blob/master/AUTHORS'>GeoNode Contributors 2026.</a> Designed by <a href="https://www.geosolutionsgroup.com/" target="_blank">GeoSolutions</a></p>
11-
</div>
12-
<div class="col-md-2">
13-
<div class="pull-right social">
14-
<a href="http://github.com/geonode/" target="_blank" alt="GitHub"><i class="fa fa-github-alt"></i></a>
15-
<a href="https://twitter.com/GeoNode" class="tw" target="_blank" alt="Twitter"><i class="fa fa-twitter"></i></a>
16-
</div>
17-
</div>
7+
<div class="gn-footer-bottom">
8+
<p class="mb-0">This <a href="http://github.com/geonode/geonode.github.com/" target="_blank">website</a> is licensed <a href='https://github.com/GeoNode/geonode/blob/master/license.txt'>CC by SA</a> &middot; <a href='https://github.com/GeoNode/geonode/blob/master/AUTHORS'>GeoNode Contributors 2026</a> &middot; Designed by <a href="https://www.geosolutionsgroup.com/" target="_blank">GeoSolutions</a></p>
9+
<div class="gn-social">
10+
<a href="http://github.com/geonode/" target="_blank" aria-label="GitHub"><i class="fa fa-github-alt"></i></a>
11+
<a href="https://twitter.com/GeoNode" target="_blank" aria-label="Twitter"><i class="fa fa-twitter"></i></a>
1812
</div>
19-
</section>
13+
</div>
2014
</div>
2115
</footer>

_includes/header.html

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1-
<header class="main">
2-
<div class="container">
3-
<div class="row justify-content-center">
4-
<div class="col-md-6" style="height: 80px"><a class="brand" href="{{ site.baseurl }}/"></a></div>
5-
<div class="col-md-6 text-end">
6-
<a target="_blank" href="http://demo.geonode.org" class="btn btn-warning">Try the Demo</a>
7-
</div>
8-
</div>
1+
<nav class="navbar navbar-expand-lg gn-navbar">
2+
<div class="container">
3+
<a class="navbar-brand" href="{{ site.baseurl }}/">
4+
<img src="{{ site.baseurl }}/static/img/geonode_logo.png" alt="GeoNode">
5+
</a>
6+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#gnNav" aria-controls="gnNav" aria-expanded="false" aria-label="Toggle navigation">
7+
<span class="navbar-toggler-icon"></span>
8+
</button>
9+
<div class="collapse navbar-collapse" id="gnNav">
10+
<ul class="navbar-nav mx-lg-auto">
11+
<li class="nav-item"><a class="nav-link" href="{{ site.baseurl }}/user_features/">Users</a></li>
12+
<li class="nav-item"><a class="nav-link" href="{{ site.baseurl }}/dev_features/">Developers</a></li>
13+
<li class="nav-item"><a class="nav-link" href="{{ site.baseurl }}/admin_features/">Admins</a></li>
14+
<li class="nav-item"><a class="nav-link" href="{{ site.baseurl }}/gallery/">Gallery</a></li>
15+
<li class="nav-item"><a class="nav-link" href="https://docs.geonode.org" target="_blank">Docs</a></li>
16+
<li class="nav-item"><a class="nav-link" href="{{ site.baseurl }}/communication/">Community</a></li>
17+
</ul>
18+
<div class="d-flex align-items-center gap-2 mt-3 mt-lg-0">
19+
<a target="_blank" href="http://demo.geonode.org" class="btn btn-gn-primary">Try the Demo</a>
20+
</div>
921
</div>
10-
</header>
22+
</div>
23+
</nav>

0 commit comments

Comments
 (0)