Better explain content types
This commit is contained in:
parent
5572f70e96
commit
717ef68221
1 changed files with 20 additions and 13 deletions
33
README.md
33
README.md
|
|
@ -29,9 +29,9 @@ To populate the calendar data, please run `./fetch-calendar.sh` before running h
|
||||||
Running the hugo command without and parameters will re-generate the site in the `public` directory.
|
Running the hugo command without and parameters will re-generate the site in the `public` directory.
|
||||||
To deploy the website, just copy the whole folder to a directory which is servered by the webserver of your preference.
|
To deploy the website, just copy the whole folder to a directory which is servered by the webserver of your preference.
|
||||||
|
|
||||||
Please note, that the website should be re-deployed at least daily to update the "announcement" section on the front page even if there were no changed to the content.
|
Please note that the website should be re-deployed at least daily to update the "announcement" section on the front page even if there were no changed to the content.
|
||||||
|
|
||||||
### Add Pages
|
### Previewing Changes Locally
|
||||||
|
|
||||||
To run a local version, just install HUGO by following the [instructions](https://gohugo.io/installation/) for your operating system.
|
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:
|
To build the website and run a development webserver, execute:
|
||||||
|
|
@ -44,16 +44,9 @@ To also build posts in the future or in draft state, run this instead:
|
||||||
hugo server -D
|
hugo server -D
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Add an Event Announcement
|
### Adding Content
|
||||||
|
|
||||||
There are two basic types of posts: Events and articles.
|
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.
|
||||||
Events will be shown on the home page from their publishing date until they have happened and shall be used for things which happen at a certain date.
|
|
||||||
This is not limited to events organized by the CCCHH, but can also be a hint to other events which we think are related to our activities.
|
|
||||||
|
|
||||||
To create a new event blog post, run a command like this:
|
|
||||||
```shell
|
|
||||||
hugo new content --kind event blog/yyyy/yyyy-mm-dd-your-event-title/index.md
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Add a Blog Entry
|
#### Add a Blog Entry
|
||||||
|
|
||||||
|
|
@ -68,16 +61,30 @@ To create a new general blog post, run a command like this:
|
||||||
hugo new content --kind article blog/yyyy/yyyy-mm-dd-your-article-title/index.md
|
hugo new content --kind article blog/yyyy/yyyy-mm-dd-your-article-title/index.md
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you want to create a blog post from scratch, or convert an event into an blog post, see the frontmatter data in [themes/ccchh/archetypes/article.md](themes/ccchh/archetypes/article.md). In particular, you need to set `categories: article` and remove any `location:`.
|
||||||
|
|
||||||
|
#### Add an Event Announcement
|
||||||
|
|
||||||
|
Events will be shown on the home page from their publishing date until they have happened and shall be used for things which happen at a certain date.
|
||||||
|
|
||||||
|
This is not limited to events organized by the CCCHH, but can also be a hint to other events which we think are related to our activities.
|
||||||
|
|
||||||
|
To create a new event blog post, run a command like this:
|
||||||
|
```shell
|
||||||
|
hugo new content --kind event blog/yyyy/yyyy-mm-dd-your-event-title/index.md
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to create an event from scratch, or convert a blog post into an event, see the frontmatter data in [themes/ccchh/archetypes/event.md](themes/ccchh/archetypes/event.md). In particular, you need to set `categories: event` and `location: Z9` (or whereever your event takes place).
|
||||||
|
|
||||||
#### Additional Notes on Events and Articles
|
#### Additional Notes on Events and Articles
|
||||||
|
|
||||||
By default the first 70 words are shown as a summary on list pages.
|
By default the first 70 words are shown as a summary on list pages.
|
||||||
Please use `<!--more-->` to manually separate the summary from other post content.
|
Please use `<!--more-->` (white space matters) to manually separate the summary from other post content.
|
||||||
|
|
||||||
Please prefix your folder name with a date to make browsing the content in the source code easier.
|
Please prefix your folder name with a date to make browsing the content in the source code easier.
|
||||||
The date in the URL will be taken from the `date` field in the front matter.
|
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).
|
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).
|
||||||
When using the commands above, the template shall have evenything you need.
|
|
||||||
|
|
||||||
#### Populate the Event Calendar
|
#### Populate the Event Calendar
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue