-
Notifications
You must be signed in to change notification settings - Fork 55
feat(blog): create blog page and publish first 2 posts #360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Aloui-Ikram
wants to merge
7
commits into
main
Choose a base branch
from
feat/add-blog-section
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c89b4a9
feat(blog): add blog page, templates, and first tutorial post
d9636a6
docs(blog): add practical Harbor Satellite SPIFFE/SPIRE tutorial
ba7ef33
docs(blog): remove prerequisites section
681c2c9
docs(blog): align pre-method architecture content with reference doc
317a4c5
website: fix markdownlint CI issues and resolve CodeRabbit comments
cc8624b
website: fix markdownlint CI issues and resolve CodeRabbit comments
05b1b0c
website: fix markdownlint CI issues and resolve CodeRabbit comments
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,160 @@ | ||
| # Website Blog Flow | ||
|
|
||
| This file explains the exact steps to add a new blog post in this Hugo website. | ||
|
|
||
| ## 1) Prepare Author Data | ||
|
|
||
| Add or update your author in: | ||
|
|
||
| `website/data/authors.yml` | ||
|
|
||
| Example: | ||
|
|
||
| ```yaml | ||
| author-id: | ||
| name: "Author Name" | ||
| role: "Contributor" | ||
| bio: "Short author biography." | ||
| repository: "https://github.com/your-username" | ||
| avatar: "https://example.com/avatar.jpg" | ||
| ``` | ||
|
|
||
| Notes: | ||
| - `repository` is used for clickable author profile links. | ||
| - `avatar` can be a remote URL or local image path. | ||
|
|
||
| ## 2) Add Blog Images | ||
|
|
||
| Put blog images in: | ||
|
|
||
| `website/static/images/blog/` | ||
|
|
||
| Use descriptive names, for example: | ||
| - `architecture-overview.png` | ||
| - `spiffe-security-model.png` | ||
|
|
||
| In markdown, reference them like this: | ||
|
|
||
| ```md | ||
|  | ||
| ``` | ||
|
|
||
| ## 3) Create the Blog Post File | ||
|
|
||
| Create a new file in: | ||
|
|
||
| `website/content/blog/` | ||
|
|
||
| Recommended filename format: | ||
|
|
||
| `YYYY-MM-DD-short-title.md` | ||
|
|
||
| Example: | ||
|
|
||
| `website/content/blog/2026-03-23-topic-name.md` | ||
|
|
||
| Use front matter like this: | ||
|
|
||
| ```yaml | ||
| --- | ||
| title: "Post title" | ||
| date: 2026-03-23T10:00:00+01:00 | ||
| author: author-id | ||
| description: "Short summary used in blog list pages." | ||
| tags: | ||
| - Topic-One | ||
| - Topic-Two | ||
| - Topic-Three | ||
| --- | ||
| ``` | ||
|
|
||
| Notes: | ||
| - `author` must match a key inside `website/data/authors.yml`. | ||
| - Tags are rendered as plain text in this project (not links). | ||
|
|
||
| ## 4) Write in How-To Style (Diataxis-Inspired) | ||
|
|
||
| For technical tutorial posts, use this order: | ||
|
|
||
| 1. Objective | ||
| 2. Prerequisites | ||
| 3. Architecture overview | ||
| 4. Step-by-step methods | ||
| 5. Validation checks | ||
| 6. Troubleshooting | ||
| 7. References | ||
|
|
||
| Keep commands copy-paste friendly and use expected output notes when helpful. | ||
|
|
||
| ## 5) Keep Blog Landing Page Enabled | ||
|
|
||
| Ensure this file exists: | ||
|
|
||
| `website/content/blog/_index.md` | ||
|
|
||
| It enables the blog section listing page. | ||
|
|
||
| ## 6) Templates Used by Blog | ||
|
|
||
| These templates control rendering: | ||
| - `website/layouts/blog/list.html` | ||
| - `website/layouts/blog/single.html` | ||
|
|
||
| Current behavior: | ||
| - Author name can link to `repository` or `github`. | ||
| - Tags are printed as plain text. | ||
| - No taxonomy pages are generated for tags/categories. | ||
|
|
||
| ## 7) Run Locally | ||
|
|
||
| From `website/`: | ||
|
|
||
| ```bash | ||
| hugo server -D | ||
| ``` | ||
|
|
||
| Open the local URL shown by Hugo and verify: | ||
| - `/blog/` list page | ||
| - Your new post page | ||
| - Images and author information | ||
|
|
||
| ## 8) Production Build Check | ||
|
|
||
| From `website/`: | ||
|
|
||
| ```bash | ||
| hugo --gc --minify --cleanDestinationDir | ||
| ``` | ||
|
|
||
| Generated output is in: | ||
|
|
||
| `website/public/` | ||
|
|
||
| ## 9) Optional Cleanup Rules | ||
|
|
||
| Do not commit generated folders outside the website build output. | ||
|
|
||
| If needed, remove accidental root-level build artifacts: | ||
|
|
||
| ```bash | ||
| rm -rf ../public | ||
| ``` | ||
|
|
||
| Taxonomy pages are disabled in: | ||
|
|
||
| `website/hugo.toml` | ||
|
|
||
| with: | ||
|
|
||
| ```toml | ||
| disableKinds = ["taxonomy", "term"] | ||
| ``` | ||
|
|
||
| ## 10) Quick Checklist | ||
|
|
||
| 1. Author exists in `data/authors.yml` | ||
| 2. Images placed under `static/images/blog/` | ||
| 3. Post created in `content/blog/` with correct front matter | ||
| 4. Post includes architecture and clear steps | ||
| 5. `hugo server -D` preview looks correct | ||
| 6. `hugo --gc --minify --cleanDestinationDir` passes | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.