changes based on jtbx's review
All checks were successful
/ build (pull_request) Successful in 44s

This commit is contained in:
Stefan Bethke 2026-06-14 20:35:22 +02:00
commit dca8a2afb4

View file

@ -36,13 +36,12 @@ Please note that the website should be re-deployed at least daily to update the
To run a local version, just install HUGO by following the [instructions](https://gohugo.io/installation/) for your operating system.
To build the website and run a development webserver, execute:
```shell
hugo server
hugo server --buildFuture --buildDrafts
```
To also build posts in the future or in draft state, run this instead:
```shell
hugo server -D
```
Note: the flags `--buildFuture --buildDrafts` makes Hugo process all content, even if the `publishDate` is still in the future, or the content is marked as `draft: true` in the frontmatter. You usually want these flags, especially if you are preparing content that should only be shown after a certain date.
Also see [Submitting Your Content](#submitting-your-content) below.
### Adding Content
@ -50,21 +49,21 @@ There are two basic types of posts: Events and blog posts.
Hugo and the template set distinguish between these two types based on frontmatter information.
When manually creating content, you need to take extra care to use the correct frontmatter data.
See the link to the Hugo archetypes below for details.
If at all possible, use `hugo new content` with the appropriate parameters to create the new content file correctly.
**If at all possible, use `hugo new content` with the appropriate parameters to create the new content file correctly.**
You should always set these frontmatter fields:
* `categories`: must be either `article` or `event`; see below.
* `date`: the date displayed for this content.
For events, that should be when the event takes place; for blog posts, it is when the post was written.
* `publishDate`: the date and time the content should be published.
Note that the date is evaluated only during site generation, so if you pick a date in the future, it might take up to 24 hours longer before your content appears.
Also note that if you do not specify a `publishDate`, the value of `date` will be used.
Note that if you do not specify a `publishDate`, the value of `date` will be used.
* `title`: the headline of your content.
#### Add a Blog Entry
Blog posts (the archetype is called `article`) should be used for information that will be relevant for a longer period, for example explanations about technical, political or cultural topics.
Articles will be shown for a few days on the home page, and in chronological order on the [blog main page](https://hamburg.ccc.de/blog/), until newer posts push them down.
Articles will be shown for a few days on the home page. The [blog page](https://hamburg.ccc.de/blog/) shows all posts, newest first.
In addition, the `tags:` can be used to find blog posts about certain topics.
To create a new general blog post, run a command like this:
@ -101,6 +100,18 @@ The date in the URL will be taken from the `date` field in the front matter.
Blog posts from before 2024-01-22 were imported from the previous website and have additional front matter data which is not usually needed (e.g. the lastmod value).
#### Submitting Your Content
After creating the new content, or making changes to existing content, please commit your changes with a meaningful commit message to a fresh branch. Name the branch in a way that makes it easy to understand what the changes are, for example, the title of your new blog post.
Push the branch to git.hamburg.ccc.de, and create a new pull request. Invite reviewers, or post the link to the PR to the [#infrastruktur:hamburg.ccc.de](https://matrix.to/#/#infrastruktur:hamburg.ccc.de) Matrix channel.
The changes you have made will be deployed to the staging website automatically (this might take a minute or two). See the comments in the PR for the link to your preview. You and the reviewers can use the link to preview the changes.
If you have set a `publishDate` to a date and time in the future, the preview will show the content as it would appear then.
Once at least one reviewer approves the PR, it will be merged and pushed to production. This usually takes less than five minutes.
#### Populate the Event Calendar
The event calendar table is filled from the Nextcloud iCal feed.