Skip to content

๐Ÿ“ Create a minimalist markdown blogging platform via github actions

License

Notifications You must be signed in to change notification settings

zonemeen/gitpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

52 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Gitpress

Create a minimalist markdown blogging platform via Github Actions

zonemeen.github.io Gitpress is released under the MIT license.

Usage Example

First visit the template repository at: zonemeen.github.io, then click on Use this template on the right side of this repository.

gitpress-template

Then name the repository according to your github username: yourname.github.io.

create-gitpress-blog

At the bottom are the specific configurations.

Configure the Blog

Create a repository(deployed via GitHub Pages, usually named yourname.github.io) on GitHub to host your blog, with the following directory structure:

โ”œโ”€โ”€ about.md
โ”œโ”€โ”€ site.json
โ”œโ”€โ”€ posts
      โ”œโ”€โ”€ better-javascript.md
      โ”œโ”€โ”€ Vue vs React.md
      โ””โ”€โ”€ technique-in-typescript.md
โ””โ”€โ”€ static
      โ”œโ”€โ”€ resume.pdf
      โ””โ”€โ”€ assets
            โ””โ”€โ”€ me.jpg

About Page

about.md is the markdown file containing the content for your about page.

Site Configuration

site.json contains the configuration of the blog. Given below is the sample JSON configuration.

{
  "title": "zonemeen",
  "subtitle": "I'm a passionate, self-taught, career-changed front-end developer since 2021",
  "owner": {
    "name": "zonemeen",
    "email": "miqilin18@gmail.com"
  },
  "social": [
    {
      "type": "Github",
      "url": "https://github.com/zonemeen"
    },
    {
      "type": "Twitter",
      "url": "https://twitter.com/zonemeen"
    }
  ],
  "seo": {
    "title": "zonemeen's blog",
    "description": "A front-end engineer's article sharing",
    "author": "zonemeen",
    "keywords": [
      "blog",
      "javascript",
      "typescript",
      "passionate",
      "self-taught",
      "career-changed",
      "front-end developer"
    ]
  },
  "cname": "zonemeen.github.io"
}

And cname is your personal domain if applicable.

Blog Posts

posts/ is the directory containing all your blog posts in Markdown format. It supports the following front-matter at the top of each blog post

---
title: Your first blog on GitHub Pages
date: 2022-06-20
permalink: /first-blog-ghpages
---

Content for your bog post

Where title is the blog post title shown on the homepage as well as on the artical detail page. date is the blog post date. permalink is the path to the artical detail page.

Static Assets

The contents of the static folder will be copied at the root of your blog and will be accessible via http://[blogurl]/filename

Configure GitHub Actions

Once you have set up your blog repository, you need to configure the GitHub actions in your repository. Create the GitHub actions automated deployment process file at .github/workflows/deploy.yml with the following content

name: Build and Deploy
on: [push]
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Deploy
        uses: zonemeen/gitpress@v1.0.27 # Visit https://github.com/marketplace/actions/gitpress-deploy-blog-action, use latest version 
        with:
          branch: gh-pages # Optional branch for GitHub Pages

About

๐Ÿ“ Create a minimalist markdown blogging platform via github actions

Resources

License

Stars

Watchers

Forks

Packages

No packages published