Skip to content

Commit

Permalink
Add instructions for publishing blog posts, creating author pages, an…
Browse files Browse the repository at this point in the history
…d creating tag pages
  • Loading branch information
ghislaineguerin committed Feb 27, 2024
1 parent 074eb75 commit b5c2730
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ This repository is a Jekyll website that powers https://mathesar.org. It is host
- [Local setup](#local-setup)
- [Installation](#installation)
- [Running locally](#running-locally)
- [Publishing to the Blog](#publishing-to-the-blog)
- [Creating a new blog post](#creating-a-new-blog-post)
- [Creating Author Pages](#creating-author-pages)
- [Creating Tag Pages](#creating-tag-pages)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand All @@ -38,3 +42,68 @@ This repository is a Jekyll website that powers https://mathesar.org. It is host
```
1. Browse to http://localhost:4000/
## Publishing to the Blog
To publish a new post on the Mathesar blog, follow these steps.
### Creating a new blog post
1. **Create a new Markdown file in the `_posts` directory.** The file name should follow this format: `YYYY-MM-DD-title-of-the-post.md`.
2. **Fill out the front matter for your post.** At the beginning of your Markdown file, include the following:
```yaml
---
layout: post
title: "Title of Your Post"
tags: tag1 tag2 tag3
date: YYYY-MM-DD
author: author_id
description: "Brief description of the post."
image: /path/to/featured/image.jpg
---
```
3. **Write your blog post.** After the front matter, use regular Markdown syntax to write your post.
### Creating Author Pages
If author_id does not exist in `_data/authors.yml`:
1. **Add author details to `_data/authors.yml`.** If your author ID does not exist, create a new entry with your details.
```yaml
your_author_id:
name: Author Name
role: Author Role
bio: >
"A brief bio about the author. This can be a few sentences long."
image: /path/to/your/image.jpg
```
### Creating Tag Pages
If you've added new tags:
1. **Run the tag generator script.** From the root directory, execute:
```
python scripts/tag_generator.py
```
This will generate pages for the new tags.
### Updating Author Pages
If you've added yourself as a new author:
1. **Run the author generator script.** From the root directory, execute:
```
python scripts/author_generator.py
```
This will generate a page for your author profile.
Remember to run the above scripts if you're introducing new tags or authors to ensure the website accurately reflects these changes.

0 comments on commit b5c2730

Please sign in to comment.