Skip to content
Open
Changes from 4 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
42 changes: 42 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,45 @@ HPC # i.e. the root of this repo
* Any links to internal files must be the relative path to it from the referencing file, not the absolute path.
* Code blocks will be automatically highlighted when rendered on the website, so please either use a code block or `inline` code whenever practical instead of a screenshot of a terminal.

## Blog posts
Comment thread
terry-cao marked this conversation as resolved.

### Creating a blog post
Here is a brief overview on how to create and style a new blog post:
Comment thread
terry-cao marked this conversation as resolved.
Outdated

First, we need to create the Markdown file for the blog. The file's name must follow the following styling. The files name must start with the date in this format XXXX-XX-XX- where each of the X sections correspond to this format YEAR-MONTH-DAY- and then is followed by a simple name that has something to do with the blog. Example Markdown file name: 2023-12-02-python_tutorial.md. The file must be placed within the posts directory which can be found as follows:
Comment thread
terry-cao marked this conversation as resolved.
Outdated
Comment thread
terry-cao marked this conversation as resolved.
Outdated
Comment thread
terry-cao marked this conversation as resolved.
Outdated
Comment thread
terry-cao marked this conversation as resolved.
Outdated

```bash
- HPC
- docs
- blog
- posts
- XXXX-XX-XX-new_file_goes_in_here.md
```

Second, we need to add the author to the authors.yml file within the blog directory. Each author has four required elements. There's the authors_name, name, description, and avatar. The authors_name is going to be the author's fullname in all lowercase with no space (example: johndoe) and this will be referenced within the blogs Markdown file later. The name is the authors full name. The description must be set to "Author" and the avatar must be set to http://nrel.github.io/HPC/blog/assets/avatar/default.png as follows:
Comment thread
terry-cao marked this conversation as resolved.
Outdated
Comment thread
terry-cao marked this conversation as resolved.
Outdated

```bash
johndoe: # This is the authors_name
name: John Doe
description: Author
avatar: http://nrel.github.io/HPC/blog/assets/avatar/default.png
```

Lastly, we have to format the blog post as follows:

```bash
---
date: XXXX-XX-XX
authors:
- authors_name # This is the authors_name we created earlier within the authors.yml file
---

# Title of the blog goes here with the "#" character included

This will be the first paragraph of the blog post. This first paragraph will be previewed on the blog landing page. Try to make this first paragraph within three sentences or so to not clutter the blog landing page. Do not forget to add the "<!-- more -->" after this first paragraph as this is what will seperate the first paragraph in the blog preview from the rest of the blog.

<!-- more --> # This seperates the blog preview from the rest of the blog

This is where the rest of the blog content will go.

```