You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
archetypes: Add more stock layouts for new content (#125)
By leveraging archetypes, we can make it quicker and easier for
contributors to create new content on the website. The readme has also
been edited to better document how to create new content; the old text
only went over blog posts, and not in a good step-by-step way.
Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
Copy file name to clipboardExpand all lines: README.md
+49-30Lines changed: 49 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,21 +8,55 @@ Static, [Hugo-based](https://gohugo.io) home of Solus and its projects. This web
8
8
9
9
## Creation
10
10
11
-
### New Post
12
-
13
-
To create a new post, change to the main directory of this repo (solus-site.github.io).
14
-
From there, call `hugo new PATH`. The `PATH` format is `blog/year/month/post-title/index.md`.
15
-
16
-
For instance, to create a blog post for Feb. 2023 with the name "Welcome To The New Site", you would use: `hugo new blog/2023/02/welcome-to-the-new-site/index.md`.
17
-
This would create `content/blog/2023/02/welcome-to-the-new-site/index.md`.
18
-
19
-
The markdown file will be created with our default configuration, which you can update as necessary. For metadata, most fields are self-explanatory.
20
-
21
-
- "name" - should match the name for your data file under `data/team/name.yml` (required)
22
-
- "featuredimage" - a relative link to an image such as "/image.png" (optional)
23
-
- "categories" is set to "news" by default. You can optionally add others.
24
-
25
-
Any featured image file must be in the same directory as the blog post.
11
+
To make page creation easier, we have some page archetypes that can be used to get started quickly.
12
+
13
+
### New content page
14
+
15
+
Regular page content, e.g. non-blog posts, can be written in two different formats: Markdown, and HTML. Markdown pages are quicker and easier to create, but lack the flexibility that comes with writing HTML. Think about how you want the page to look, and choose which format to use based on the page's design.
16
+
17
+
#### Markdown page
18
+
19
+
1. Change to the main directory of this repository.
20
+
2. Run `hugo new` to create the basic page structure.
21
+
```bash
22
+
hugo new --kind markdownpage content/pagename.md
23
+
```
24
+
3. Write the page content as Markdown.
25
+
26
+
#### HTML page
27
+
28
+
1. Change to the main directory of this repository.
29
+
2. Run `hugo new` to create the basic page structure.
30
+
```bash
31
+
hugo new --kind htmlpage content/pagename.md
32
+
```
33
+
3. Write the page content using HTML.
34
+
35
+
We have several component shortcodes you can use to achieve a design that fits with the rest of the website. Some of these include:
36
+
37
+
-`section`
38
+
-`link`
39
+
-`button`
40
+
-`bulletpoint`
41
+
42
+
### New blog post
43
+
44
+
1. Change to the main directory of this repository.
45
+
2. Run `hugo new` to create the basic page structure. Replace the year, month, and title with real values in the example command below.
46
+
```bash
47
+
hugo new --kind blog content/blog/2026/01/my-blog-post/index.md
48
+
```
49
+
3. Edit the post's frontmatter as necessary. Most fields are self-explanatory.
50
+
-`authors` - A list of people who authored the post.
- `tags` - A tags a post should have, e.g. `news`, `devlog`, `release`. Tags are free; use as many as you like!
58
+
- `url`- The final URL of the blog post. `:year` and `:day` are placeholders that will automatically be filled in by Hugo during page generation, and should not need to be edited.
59
+
4. Write the post content as Markdown.
26
60
27
61
### File and directory standards
28
62
@@ -50,21 +84,6 @@ As an example, as of October, the directory for 2023 looks like:
50
84
└── index.md
51
85
```
52
86
53
-
Example of blog post metadata
54
-
55
-
```
56
-
---
57
-
title: "Solus 4.4 Released"
58
-
author: "joshua"
59
-
categories:
60
-
- news
61
-
- releases
62
-
date: 2023-07-08T00:27:44+03:00
63
-
featuredimage: "/solus-4.4-featured.jpg"
64
-
url: "/2023/07/08/solus-4-4-released"
65
-
---
66
-
```
67
-
68
87
## Use caution before deleting files
69
88
70
89
Files in `static/imgs/release-images/` may be used outside of the website.
0 commit comments