- Built using Sphinx.
- Uses the sphinx.ext.autodoc extension to import the modules, read the documentation for each function, and automatically generate the API documentation based on that.
- Uses the sphinx epytext extension to convert older-style Epydoc documentation format to Sphinx-readable documentation.
- Uses the recommonmark package so that Markdown can be used.
- Uses the default sphinx.ext.viewcode to insert links to the related source code.
- Clones the master branch of the autokey/autokey repository.
- Installs Autokey in the cloned autokey repository.
- Installs Sphinx.
- Builds the Sphinx site in the docs folder.
- Uploads the GitHub Pages from the docs folder.
- Deploys the documentation as GitHub Pages.
- You'll need the following Python packages and dependencies:
# Clone the AutoKey documentation repository: git clone https://github.com/autokey/autokey.github.io.git # Open the AutoKey documentation cloned directory: cd autokey.github.io # Clone the Autokey repository: git clone https://github.com/autokey/autokey # Open the AutoKey cloned directory: cd autokey # Install Autokey in the cloned autokey repository: pip install . # Reopen the AutoKey documentation cloned directory cd .. # Install Sphinx and recommonmark: pip install sphinx recommonmark sphinx-rtd-theme sphinx-epytext enum-tools[sphinx]
- If this is a first-time installation, restart the shell so that the
sphinx-build
command can be found, and reopen the AutoKey documentation cloned directory. - Build the documentation:
# Build the Sphinx site: sphinx-build -a -E -b html . ./docs
When changes are made to the documentation, the GitHub actions will need to be run manually to rebuild the documentation pages:
- Pick one:
- Navigate to the workflow:
- Open the repository.
- Open the Actions menu.
- Choose Build AutoKey pages in the left pane.
- Go directly to the workflow from here:
- Go to Build Autokey pages.
- Navigate to the workflow:
- Click the Run workflow drop-down in the right pane.
- Click the Run workflow button in the context menu.
- Wait for the process to finish.
- Open the new documentation and check if the change looks good or if further work is needed.
The GitHub action versions should be checked and updated regularly.
- Check the pages.yml file on the master branch for updates:
- Check if the actions/checkout version number has changed
- Check if the actions/upload-pages-artifact version number has changed.
- Check if the actions/deploy-pages version number has changed.
- Update the version numbers if any have changed:
- Fork this repository. Note that GitHub will automatically open the fork that you just created.
- Create the update_the_actions branch off of the master branch. Note that GitHub will automatically put you onto the new branch that you just created.
- Open the pages.yml file.
- Update the version numbers of the actions that have changed.
- Save and commit the file.
- Update the change log:
- Open the CHANGELOG.md file.
- ️Note the change.
- ️Save and commit the file.
- ️Do a pull request.
- Do the cleanup:
- Wait for an email message notifying you that an administrator has merged the pull request into the project.
- Open the merged pull request by clicking its link in that email message.
- Click the Delete branch button.
The pip dependencies should be checked and updated regularly.
- Check the dependencies in the requirements.txt file on the master branch for updates:
- Check if the sphinx version number has changed.
- Check if the sphinx_rtd_theme version number has changed.
- Check if the sphinx-epytext version number has changed.
- Check if the recommonmark version number has changed.
- Check if the enum-tools[sphinx] version number has changed.
- Update the version numbers if any have changed:
- Fork this repository. Note that GitHub will automatically open the fork that you just created.
- Create the update_the_dependencies branch off of the master branch. Note that GitHub will automatically put you onto the new branch that you just created.
- Open the requirements.txt file.
- Update the version numbers of the dependencies that have changed.
- Save and commit the file.
- Update the change log:
- Open the CHANGELOG.md file.
- ️Note the change(s) you made.
- ️Save and commit the file.
- ️Do a pull request.
- Do the cleanup:
- Wait for an email message notifying you that an administrator has merged the pull request into the project.
- Open the merged pull request by clicking its link in that email message.
- Click the Delete branch button.
- Going forward, we should use Sphinx syntax in comments instead of the older Epytext syntax. See the reStructuredText Primer for more information on the new comment markup.
- We should consider using the sphinxcontrib-multiversion plugin that supports versioned documentation and seems to be decently well-maintained.