From 2ce6c8eac09540ba683a910da37285e5d7e6d3b4 Mon Sep 17 00:00:00 2001 From: Symbioquine Date: Thu, 12 Nov 2020 16:17:14 -0800 Subject: [PATCH] Add instructions about how to update documentation to documentation --- .gitignore | 1 + docs/development/environment/documentation.md | 39 +++++++++++++++++++ mkdocs.yml | 1 + 3 files changed, 41 insertions(+) create mode 100644 .gitignore create mode 100644 docs/development/environment/documentation.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..45ddf0ae39 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +site/ diff --git a/docs/development/environment/documentation.md b/docs/development/environment/documentation.md new file mode 100644 index 0000000000..e76e357ee3 --- /dev/null +++ b/docs/development/environment/documentation.md @@ -0,0 +1,39 @@ +# Documentation + +In addition to the code for farmOS 2.x, this repository includes the source files of the +documentation which is hosted at [http://2x.farmos.org](http://2x.farmos.org). + +It uses [mkdocs](http://www.mkdocs.org) to convert simple markdown files into +static HTML files. + +To get started contributing to the farmOS 2.x documentation, fork +[farmOS](https://github.com/farmOS/farmOS/tree/2.x) on Github. Then install mkdocs and +clone this repo: + + $ brew install python # For OSX users + $ sudo apt-get install python-pip # For Debian/Ubuntu users + $ sudo pip install mkdocs mkdocs-bootstrap mkdocs-bootswatch + $ git clone https://github.com/farmOS/farmOS.git farmOS + $ cd farmOS + $ git checkout 2.x + $ git remote add sandbox git@github.com:/farmOS.git + $ mkdocs serve + +Your local farmOS 2.x documentation site should now be available for browsing: +http://127.0.0.1:8000/. When you find a typo, an error, unclear or missing +explanations or instructions, hit ctrl-c, to stop the server, and start editing. +Find the page you’d like to edit; everything is in the docs/ directory. Make +your changes, commit and push them, and start a pull request: + + $ git checkout -b fix_typo # Create a new branch for your changes. + ... # Make your changes. + $ mkdocs build --clean; mkdocs serve # Go check your changes. + $ git diff # Make sure there aren’t any unintended changes. + ... + $ git commit -am "Fixed typo." # Useful commit message are a good habit. + $ git push sandbox fix_typo # Push your new branch up to your Github sandbox. + +Visit your fork on Github and start a Pull Request. + +For more information on writing and managing documentation with mkdocs, read the +official mkdocs documentation: [http://www.mkdocs.org](http://www.mkdocs.org) diff --git a/mkdocs.yml b/mkdocs.yml index 602eaa0fdd..04a5709cd1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -17,6 +17,7 @@ nav: - Debugging: development/environment/debug.md - Automated tests: development/environment/tests.md - Coding standards: development/environment/code.md + - Documentation: development/environment/documentation.md - Module: - Fields: development/module/fields.md - OAuth: development/module/oauth.md