Documentation/README.md

74 lines
2.1 KiB
Markdown
Raw Permalink Normal View History

2021-03-03 16:43:54 +00:00
# Documentation
2021-03-03 23:54:38 +00:00
User-made documentation for [GooseMod](https://goosemod.com).
2021-03-05 16:25:16 +00:00
[View the documentation](https://novagm.github.io/Documentation).
2021-03-03 23:54:38 +00:00
## Adding content
To add content to this documentation, first fork it to have your own copy of
the repo. Clone your fork and make your edits there.
To add a page, add a MarkDown `.md` file to one of the categories
(eg: `module-development/`).
You can also add your own category by adding a directory with a `README.md`
file inside, that describes what your category is about and lists the
category's files by adding this line:
2021-03-05 16:25:16 +00:00
2021-03-03 23:54:38 +00:00
```
{% include list.liquid all=true %}
```
By default Jekyll will pull the first title as the page's title, but that can
be overwritten with front matter at the top of your page:
2021-03-05 16:25:16 +00:00
2021-03-03 23:54:38 +00:00
```yaml
---
title: Your title
# other front matter definitions
---
2021-03-05 16:25:16 +00:00
2021-03-03 23:54:38 +00:00
```
To sort a category's pages, add a `sort` property to the pages' front matter
section:
2021-03-05 16:25:16 +00:00
2021-03-03 23:54:38 +00:00
```yaml
---
# other front matter definitions
sort: <number>
---
2021-03-05 16:25:16 +00:00
2021-03-03 23:54:38 +00:00
```
## Updating the documentation website
Before pushing your edits to the documentation, you may want to see what they
look like. To do so, you need to:
2021-03-05 16:25:16 +00:00
2021-05-22 20:57:50 +00:00
- have a local [Ruby](https://www.ruby-lang.org) 2.7 environment
2021-03-05 16:25:16 +00:00
- install the `bundler` and `jekyll` gems
2021-03-03 23:54:38 +00:00
`gem install bundler jekyll`
2021-03-05 16:25:16 +00:00
- install this project's specific requirements:
2021-03-03 23:54:38 +00:00
`bundle install` (or `bundle update` if you already built it before)
2021-03-05 16:25:16 +00:00
- run Jekyll:
2021-03-03 23:54:38 +00:00
`bundle exec jekyll serve`
- open the address that is returned on the terminal in your browser
(usually `http://127.0.0.1:4000/`)
To push your modifications to the documentation, push your modifications to
your fork and submit a pull request to this one.
No particular operation is needed, [Github Pages](https://pages.github.com)
will update the documentation's website whenever commits are pushed to this
repo.
## Additional resources
- GH Pages: [Github Pages docs](https://docs.github.com/en/github/working-with-github-pages/setting-up-a-github-pages-site-with-jekyll)
- Generator: [Jekyll docs](https://jekyllrb.com/docs/)
- Theme: [jekyll-rtd-theme](https://jekyll-rtd-theme.rundocs.io/) and
2021-03-05 16:25:16 +00:00
[rundocs.io](https://rundocs.io/)