Reads diaries written in markdown from a git submodule, and generates a static site for it. (Demo)
Requires Node 4.x and above.
About the repos
The markdown files for the diaries can be kept under another repo namedYYYY/MM/DDDD.md(Example).Build
- Run
npm installto install the dependencies - Configure
config.js git checkout -b yournamefor your own branch(so you can keep the master branch intact in case you want to receive updates)git rm diaryto remove the old submodule for diariesgit submodule add git://new/submodule.git diaryto add your own submodule- Commit the changes (to your own branch) if you want.
- Run
gulp buildto generate the static site (placed underdist). - Run
gulp serverand visithttp://localhost:8000/diaryif you want to see it hosted locally(make sure the port 8000 is not taken).
Deploy to GitHub Pages
- Set up the SSH git remote
originfor the project. - After building the web page, run
gulp deploy. - Everything under dist will be pushed to the remote repo's gh-pages branch.
Develop
- Make sure port 35729(for livereload) and 8000(for the local server) are available.
- Run
gulp, then visithttp://localhost:8000/diary. - Start development!
- When you are done, you can checkout the changes from your branch to the master branch, and send in a pull request if you want.
No comments:
Post a Comment