├── .github └── main.workflow ├── Another-page.md ├── Gemfile ├── README.md └── _config.yml /.github/main.workflow: -------------------------------------------------------------------------------- 1 | workflow "Build pages" { 2 | on = "push" 3 | resolves = ["build-deploy-to-github-pages"] 4 | } 5 | 6 | action "build-deploy-to-github-pages" { 7 | uses = "hackmdio/jekyll-deploy-gh-pages@master" 8 | secrets = ["GITHUB_TOKEN"] 9 | } 10 | -------------------------------------------------------------------------------- /Another-page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Another page 3 | nav_order: 2 4 | --- 5 | 6 | Another page 7 | === 8 | 9 | Hello world! 10 | 11 | This is another page, enjoy :) 12 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'github-pages', group: :jekyll_plugins 4 | gem "just-the-docs" 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | How to make a doc site on GitHub with HackMD 2 | === 3 | 4 | Getting started 5 | --- 6 | 7 | 1. Clone or fork this repo on GitHub 8 | 2. Change the `baseurl` to your repo name in `_config.yml` 9 | 3. Open new branch named `gh-pages` and push to your GitHub remote (e.g. `git branch gh-pages && git push origin gh-pages`) 10 | 4. Ensure you setup GitHub Pages source uses `gh-pages` branch 11 | 5. Create a new note on HackMD 12 | 6. Select `Pull from GitHub` and select your repo, `master` branch and select `README.md` from the file dropdown then click `Pull` 13 | 7. Modify the content on HackMD (See more at: https://jekyllrb.com/docs/posts/) 14 | 8. Select `Versions` on the top right menu, click `Push to GitHub` 15 | 9. Fill the new Version name and click `Push` 16 | 10. Wait for GitHub Actions build your doc site and view it on GitHub Pages! 17 | 18 | Add a new page to doc site 19 | --- 20 | 21 | 1. Create a new note on HackMD 22 | 2. Modify the content on HackMD (See more at: https://jekyllrb.com/docs/posts/) 23 | 3. Select `Push to GitHub` and select your repo, `master` branch and create a new filename (e.g. `Another-page.md`) then click `Push` 24 | 4. Wait for GitHub Actions build your doc site and view it on GitHub Pages! 25 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | destination: ./build 2 | baseurl: 'docs-with-hackmd' 3 | title: "My doc site" 4 | theme: just-the-docs 5 | search_enabled: false 6 | --------------------------------------------------------------------------------