Skip to content

Commit 52d9cf5

Browse files
committed
Migrated website to hugo
1 parent 56b4685 commit 52d9cf5

825 files changed

Lines changed: 56005 additions & 1 deletion

File tree

Some content is hidden

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

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ src/.jekyll-cache/
1010
scripts/release/__pycache__/
1111
.bundle/config
1212
vendor/*
13-
content
1413
.DS_Store

AGENTS.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# AGENTS.md — Hugo Migration Guide
2+
3+
This document describes the approach and conventions used when migrating the Apache ActiveMQ website from Jekyll (`src/`) to Hugo (`hugo/`).
4+
5+
## Repository layout
6+
7+
```
8+
activemq-website/
9+
├── src/ # Original Jekyll source (do not modify)
10+
├── hugo/ # Hugo site (migration target)
11+
│ ├── hugo.toml
12+
│ ├── assets/css/main.css
13+
│ ├── content/
14+
│ ├── data/
15+
│ ├── layouts/
16+
│ ├── static/assets/
17+
│ └── scripts/
18+
└── AGENTS.md # This file
19+
```
20+
21+
## Hugo conventions
22+
23+
### Layout lookup
24+
Hugo resolves layouts by content type (directory name under `content/`):
25+
- `content/foo/_index.md``layouts/foo/list.html`
26+
- `content/foo/bar.md``layouts/foo/single.html`
27+
- Falls back to `layouts/_default/single.html` or `list.html`
28+
29+
### Two-block page structure
30+
Every layout uses two blocks defined in `layouts/_default/baseof.html`:
31+
- `above-main` — full-width content (hero banners, page title banners) rendered **outside** the padded `<main>` container
32+
- `main` — normal page content inside the max-width container
33+
34+
### Raw HTML in Markdown
35+
`hugo.toml` sets `[markup.goldmark.renderer] unsafe = true` to allow inline HTML in `.md` files. This is intentional — several pages use HTML tables and `<div>` blocks ported from Jekyll.
36+
37+
## Theme
38+
39+
Single self-contained stylesheet at `hugo/assets/css/main.css`. Key variables:
40+
41+
```css
42+
--red: #c0392b /* primary accent */
43+
--surface: #f7f7f8 /* card/banner backgrounds */
44+
--border: #e5e5e7
45+
--text: #1a1a1a
46+
--muted: #6b7280
47+
--max-w: 1100px
48+
```
49+
50+
Rules of thumb:
51+
- Nav is white with a bottom border; links turn red on hover
52+
- Page title banners (News, Download, etc.) use `background: var(--red)` with white `h1`
53+
- Component hero banners (ActiveMQ component page) also use red with white text and the vertical logo
54+
- Homepage hero uses `var(--surface)` (light grey) — no red background
55+
56+
## Pages migrated so far
57+
58+
| URL | Content file | Layout |
59+
|-----|-------------|--------|
60+
| `/` | `content/_index.md` | `layouts/index.html` |
61+
| `/news/` | `content/news/_index.md` | `layouts/news/list.html` |
62+
| `/news/<slug>` | `content/news/*.md` | `layouts/news/single.html` |
63+
| `/components/classic/` | `content/components/classic/_index.md` | `layouts/components/list.html` |
64+
| `/download/` | `content/download/index.md` | `layouts/download/list.html` |
65+
66+
## Migrating a new page
67+
68+
1. Find the source in `src/` (usually `src/<path>/index.md` or `src/<path>.md`).
69+
2. Create `hugo/content/<path>/index.md` (or `<slug>.md` for a leaf page).
70+
3. Copy the front matter fields `title` and `date`; drop Jekyll-specific fields (`layout`, `type`, `title-class`).
71+
4. Strip Liquid tags (`{% %}`, `{{ }}`). Replace with static content or Hugo template syntax.
72+
5. If the page needs a banner + breadcrumb, create a layout in `layouts/<section>/` using the `above-main` / `main` block pattern (copy `layouts/news/list.html` as a starting point).
73+
6. If the page is purely content with no special chrome, the `_default/single.html` layout is sufficient.
74+
75+
## Importing news / release content in bulk
76+
77+
Run the import script to convert all Jekyll release collections into Hugo news items:
78+
79+
```bash
80+
cd hugo
81+
python3 scripts/import_news.py
82+
```
83+
84+
The script reads `src/_classic_releases/`, `src/_nms_*_releases/`, and `src/_news/`, extracts `title`, `release_date`, and `shortDescription` front matter, strips Liquid tags from the body, and writes Hugo `.md` files to `content/news/`. Existing files are not overwritten.
85+
86+
## Static assets
87+
88+
All images from `src/assets/img/` are copied to `hugo/static/assets/img/` and served verbatim. Reference them as `/assets/img/<filename>` in templates and content.
89+
90+
## Global CSS resets to watch out for
91+
92+
The global `ul`, `ol`, and `li` rules add `padding-left` and `margin-bottom`. Any nav or UI component that contains a `<ul>` must explicitly reset these:
93+
94+
```css
95+
.my-component ul { padding-left: 0; margin-bottom: 0; }
96+
.my-component li { margin: 0; padding: 0; }
97+
```

hugo/.hugo_build.lock

Whitespace-only changes.

hugo/README.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Apache ActiveMQ Website — Hugo
2+
3+
This directory contains the Hugo-based rewrite of the [activemq.apache.org](https://activemq.apache.org/) website.
4+
The original Jekyll source lives in `../src/`.
5+
6+
## Prerequisites
7+
8+
Install Hugo (extended edition recommended for SCSS support):
9+
10+
```bash
11+
# macOS
12+
brew install hugo
13+
14+
# Linux (snap)
15+
snap install hugo
16+
17+
# Or download a binary from https://github.com/gohugoio/hugo/releases
18+
```
19+
20+
Verify the installation:
21+
22+
```bash
23+
hugo version
24+
```
25+
26+
## Local development
27+
28+
From this directory (`hugo/`):
29+
30+
```bash
31+
# Serve with live reload
32+
hugo server
33+
34+
# Open http://localhost:1313 in your browser
35+
```
36+
37+
Useful flags:
38+
39+
| Flag | Purpose |
40+
|------|---------|
41+
| `--buildDrafts` / `-D` | Include draft content |
42+
| `--port 1314` | Use a different port |
43+
| `--disableFastRender` | Full re-render on every change |
44+
45+
## Build
46+
47+
```bash
48+
hugo
49+
```
50+
51+
Output is written to `hugo/public/`. To change the output directory:
52+
53+
```bash
54+
hugo --destination ../output
55+
```
56+
57+
## Clean
58+
59+
```bash
60+
rm -rf public resources
61+
```
62+
63+
## Project layout
64+
65+
```
66+
hugo/
67+
├── hugo.toml # Site configuration
68+
├── content/ # Markdown/HTML page sources
69+
│ └── _index.md # Homepage
70+
├── layouts/
71+
│ ├── _default/
72+
│ │ ├── baseof.html # Base HTML shell
73+
│ │ └── single.html # Default single-page layout
74+
│ ├── index.html # Homepage layout
75+
│ └── partials/
76+
│ ├── nav.html
77+
│ └── footer.html
78+
└── static/ # Files copied verbatim to output (images, etc.)
79+
```

0 commit comments

Comments
 (0)