Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 49 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,55 @@ Static, [Hugo-based](https://gohugo.io) home of Solus and its projects. This web

## Creation

### New Post

To create a new post, change to the main directory of this repo (solus-site.github.io).
From there, call `hugo new PATH`. The `PATH` format is `blog/year/month/post-title/index.md`.

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`.
This would create `content/blog/2023/02/welcome-to-the-new-site/index.md`.

The markdown file will be created with our default configuration, which you can update as necessary. For metadata, most fields are self-explanatory.

- "name" - should match the name for your data file under `data/team/name.yml` (required)
- "featuredimage" - a relative link to an image such as "/image.png" (optional)
- "categories" is set to "news" by default. You can optionally add others.

Any featured image file must be in the same directory as the blog post.
To make page creation easier, we have some page archetypes that can be used to get started quickly.

### New content page

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.

#### Markdown page

1. Change to the main directory of this repository.
2. Run `hugo new` to create the basic page structure.
```bash
hugo new --kind markdownpage content/pagename.md
```
3. Write the page content as Markdown.

#### HTML page

1. Change to the main directory of this repository.
2. Run `hugo new` to create the basic page structure.
```bash
hugo new --kind htmlpage content/pagename.md
```
3. Write the page content using HTML.

We have several component shortcodes you can use to achieve a design that fits with the rest of the website. Some of these include:

- `section`
- `link`
- `button`
- `bulletpoint`

### New blog post

1. Change to the main directory of this repository.
2. Run `hugo new` to create the basic page structure. Replace the year, month, and title with real values in the example command below.
```bash
hugo new --kind blog content/blog/2026/01/my-blog-post/index.md
```
3. Edit the post's frontmatter as necessary. Most fields are self-explanitory.
- `authors` - A list of people who authored the post.
```yaml
authors:
- image: https://avatars.githubusercontent.com/u/5157277?v=4
link: https://github.com/EbonJaeger
name: Evan Maddock
```
- `tags` - A tags a post should have, e.g. `news`, `devlog`, `release`. Tags are free; use as many as you like!
- `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.
4. Write the post content as Markdown.

### File and directory standards

Expand Down Expand Up @@ -50,21 +84,6 @@ As an example, as of October, the directory for 2023 looks like:
└── index.md
```

Example of blog post metadata

```
---
title: "Solus 4.4 Released"
author: "joshua"
categories:
- news
- releases
date: 2023-07-08T00:27:44+03:00
featuredimage: "/solus-4.4-featured.jpg"
url: "/2023/07/08/solus-4-4-released"
---
```

## Use caution before deleting files

Files in `static/imgs/release-images/` may be used outside of the website.
Expand Down
8 changes: 8 additions & 0 deletions archetypes/blog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
authors:
tags:
- news
date: '{{ time.Now.Format "2006-01-02" }}'
title: '{{ replace .File.ContentBaseName "-" " " | title }}'
url: '/:year/:month/{{ replace .File.ContentBaseName "." "-" }}'
---
7 changes: 7 additions & 0 deletions archetypes/htmlpage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: solus
title: '{{ replace .File.ContentBaseName "-" " " | title }}'
toc: false
---

{{< page-header title="{{ replace .File.ContentBaseName "-" " " | title }}" subtitle="" >}}
6 changes: 1 addition & 5 deletions archetypes/default.md → archetypes/markdownpage.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
authors:
tags:
- news
date: '{{ .Date }}'
title: '{{ replace .File.ContentBaseName "-" " " | title }}'
url:
toc: false
---
Loading