The Apache MyNewt site is built using MkDocs.
Clone the repo:
git clone https://github.com/apache/mynewt-site
cd mynewt-site
Optional: it's a very good idea to use a virtualenv
:
virtualenv venv
. venv/bin/activate
Install the requirements:
pip install -r requirements.txt
- Fork the repo.
- Work on the
develop
branch. - Preview your changes using MkDocs.
mkdocs serve
- visit http://localhost:8000
- Submit a pull request.
When a release of MyNewt OS and its associated tools occurs, a new branch should be created to hold all docs pertaining to that release. The documentation in the git develop
branch of this repository always shows the latest docs under development (beyond the latest release). The following steps will create a documentation branch for a new release and make it available from the mynewt-site.
- Merge pull requests to
develop
on github. - Checkout
develop
.git pull --rebase origin develop
to pull the latest merged changes.
- Switch to the master branch.
git checkout master
- Create a new stanza in
mkdocs.yml
to reflect the new version. (SKIP THIS STEP IF NOT A NEW RELEASE)- and update the
latest
flag, only one release should be marked latest. - and update version to match the new branch name.
- and update the
- Commit this change. (SKIP THIS STEP IF NOT A NEW RELEASE)
- Create a branch from master to reflect this new version. (SKIP THIS STEP IF NOT A NEW RELEASE)
- Run:
./build.py
- Run:
./serve.py
- Visit http://localhost:8000
- Run:
./deploy.sh build
- This will leave you on the
asf-site
branch. - Commit & push the changes.
For the deployed site a version prefix is added to the URL for each mkdocs page. When developing there is no version prefix. If you want to link from a site page to a documentation page you should prefix the URL with /DOCSLINK/ so that the user is taken to the correct location when browsing in production.
- Grab a link checking tool like Integrity
- Run:
./build.py --test-build
- Run:
./serve.py
- point the link checker at http://localhost:8000/