From 4047f9dd570555372f334e18ab3064616c04df66 Mon Sep 17 00:00:00 2001 From: Klemek Date: Thu, 20 Jun 2019 00:09:02 +0200 Subject: [PATCH 1/2] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 5d3d913..d00d5ad 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,9 @@ You need to [create a new repository](https://github.com/new) on your favorite G ```bash #gitblog.md/ cd data +git init +git add . +git commit -m "initial commit" git remote add origin git push -u origin master ``` From 6175bc5074c3c5ce6e868fb326d56edf54617882 Mon Sep 17 00:00:00 2001 From: Klemek Date: Thu, 20 Jun 2019 14:29:36 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 86 +------------------------------------------------------ 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/README.md b/README.md index d00d5ad..fc37e8f 100644 --- a/README.md +++ b/README.md @@ -1,90 +1,6 @@ # GitBlog.md (WIP) -> This is a work in progress, some information written here might not be true yet. +> This is a work in progress, development are in the branch 'dev' [![Build Status](https://img.shields.io/travis/Klemek/GitBlog.md.svg?branch=master)](https://travis-ci.org/Klemek/GitBlog.md) A static blog using Markdown pulled from your git repository. - -## Flow - -![root](./uml/root.png) - -![article](./uml/article.png) - -![webhook](./uml/webhook.png) - -![rss](./uml/rss.png) - -## Installation -**1. Download and install the latest version from the repo** -```bash -git clone https://github.com/klemek/gitblog.md.git -npm install -``` -**2. Create your config file** -```bash -cd gitblog.md -cp config.example.json config.json -``` -then edit the config.json file with your values : -> default values for config.json -````json -{ - "nodePort": 3000, - "dataDir": "data", - "modules" : { - "plantuml" : false, - "rss": true, - "webhook": true - }, - "home" : { - "index" : "index.ejs" - }, - "article" : { - "index" : "index.md" - }, - "rss" : { - "endpoint" : "/rss", - "length" : 10 - }, - "webhook" : { - "endpoint": "/webhook", - "secretFile": "git_secret" - } -} -```` - -**3. Start your server** - -```bash -npm start -#or -node src/server.js -``` - -You might want to use something like screen to separate the process from your current terminal session. - -**4. Create and init your git source** - -You need to [create a new repository](https://github.com/new) on your favorite Git service. - -```bash -#gitblog.md/ -cd data -git init -git add . -git commit -m "initial commit" -git remote add origin -git push -u origin master -``` - -**5. Refresh content with a webhook (optional)** - -At first start, a `git_secret` file will be generated, use it to create a new webhook as following : - -* Payload URL : `https:///webhook` -* Content type : `application/json` -* Secret : `` -* Events : Just the push event - -On GitHub, webhooks can be created in the `Settings/Webhooks` part of the repository.