taontech / githublog

一个基于github issues的博客系统,实时呈现,零依赖,零代码部署,不用打包不用上线。
4 stars 1 forks source link
blog gitalk markdown mermaid

githublog

A super small blog repo. xxxx You can use github's issuse to present your blog posts in real time without having to repackage them online. Each of your blogs is visible in real time, and suppurt gitalk and mermaid, other users can comment and like at any time.

Demo:

Install

private web server

clone all code to your webserver root

git clone https://github.com/taontech/githublog.git your-webserver-path

install with Github pages

fork this repo.

settings

  1. After fork repo, remember to open issues, the default fork repo is to close issuse.
  2. Write the first issuse
  3. Create a new app in "setting -> developer settings -> OAuth Apps", and write the domain name: "https://**yourname**.github.io", generate a new client secret.
  4. Open the repo "pages", select the main branch and any of the themes.

modify config

modify config.json file

"127.0.0.1":{
    "owner" : "your Github count name",
    "repo" : "your repo which hold the issuses",
    "clientId" : "github client id",
    "clientSecret" : "github clentSecret"
    "theme":"default"
}

Note:: When you add the Oauth App to obtain the required secretkey, you need to add the correct domain name, which is the domain name that will eventually provide the webservice.

Example:

"tech.top" :{
    "owner" : "taontech",
    "repo" : "githublog",
    "clientId" : "16a063cf308dce2e4ac0",
    "clientSecret" : "ca53b8ba928064a6ff64ef1fde762196625ef90a"
    "theme":"forest"
}

how to Get client id and client secret?

⚠️Attation: Your application’s callback URL. Read OAuth documentation for more information.

Then

Enjoy!