forked from expressjs/expressjs.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- adjust tags side menu and remove from workflow - add in second side menu - add How To write Post page - add more styles
- Loading branch information
1 parent
7eb4ddf
commit 35d7ff9
Showing
8 changed files
with
129 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<ul id="blog-side-menu"> | ||
<li> | ||
<a href="/blog/write.html">Write a Post</a> | ||
</li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
layout: blog-posts | ||
title: Write a Blog Post | ||
menu: blog | ||
lang: en | ||
redirect_from: "/blog/write.html" | ||
--- | ||
|
||
# Write A Blog Post | ||
|
||
## Have an idea for a blog post? Write a post and make a PR. | ||
|
||
Check out an example [post](/{{ page.lang }}/blog/example.html) | ||
|
||
- ### Setup the Repository | ||
A local installation will be required it you want to preview your post. [Here](https://github.com/expressjs/expressjs.com?tab=readme-ov-file#expressjscom) are the instructions for running locally. | ||
|
||
- ### Create a new file in the `_posts` directory | ||
Create a new file and save it following the format: `YYYY-MM-DD-title.md`. The date should be the date of your post. | ||
|
||
- ### Adding the Required Front Matter | ||
The following front matter are required for each post. At the top of the file you just created, add the following: | ||
|
||
```yaml | ||
--- | ||
layout: blog-post | ||
title: "<your-title>" | ||
sub_title: "<your-sub-title>" | ||
menu: blog | ||
date: <date-matching_filename> | ||
tags: <white-space-seperated-topics> | ||
author: <your-name> | ||
img: <path-or-url-to-image> | ||
lang: en | ||
excerpt_separator: <!--more--> | ||
--- | ||
``` | ||
|
||
- ### Add your Content | ||
Finally, start writing your content. Format your content as follows, including the title and subtitle, and the `<!--more-->` following your first paragraph. | ||
|
||
```markdown | ||
{% raw %} | ||
# {{page.title}} | ||
|
||
### {{page.sub_title}} | ||
{% endraw %} | ||
Lorem ipsum dolor sit amet... | ||
<!--more--> | ||
|
||
ivamus lacinia sollicitudin turpis sed porta. Ut commodo, orci eget congue dictum, sapien est scelerisque ante, | ||
vehicula ultricies ipsum justo in quam. Aliquam pretium diam vitae neque eleifend laoreet. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters