Skip to content
/ devportal Public
forked from aiven/devportal

Resources for users of the projects on the Aiven platform

License

Notifications You must be signed in to change notification settings

hb3b/devportal

 
 

Repository files navigation

Aiven Developer

This is the source for the Aiven developer documentation at https://developer.aiven.io. We are working to move all of our technical documentation to this platform, and welcome issues and pull requests from everyone.

It is Python-based, with content in ReStructuredText (rst) and rendered by Sphinx.

Contributing

Check the CONTRIBUTING guide for details on how to create content for Aiven Developer. You will find the style guide, pull request process and templates for the various content types there.

Local Development

We recommend using a virtual environment like venv:

python3 -m venv /path/to/new/virtual/environment

If you call it something other than venv or env, make sure to add your preferred name to .gitignore.

Activate your virtual environment using the activate script for your environment.

Install the dependencies:

pip install -r requirements.txt

Start the HTML version with:

make livehtml

Your preview should be at http://localhost:8000 (if anything doesn't seem to re-render well, the navigation seems particularly unreliable, try make clean and then make livehtml again).

> If you are working on the templates, try the additional make livehtmlall command. This disables sphinx's incremental build and also observes changes to the assets, so it's slower but more like a full rebuild when things change.

Windows users

Replace all make commands with ./make - this uses the make.bat file instead of Makefile but the functionality should be equivalent.

Running build tasks locally

To run the spell check locally, you will need to have Vale installed on your computer and available on your path.

  • Check links: make linkcheck
  • Check spelling: make spell

If the spellchecker is rejecting words that are valid (such as technology terms), double check the spelling and capitalisation, then add the word to .github/styles/Vocab/Docs/accept.txt.

Navigation structure

The left-hand navigation menu is driven by a plugin called Sphinx external TOC. You can find our structure in _toc.yml.

Formatting tips

Here's an incomplete but helpful collection of tips for formatting your content on Aiven Developer.

Links are different depending on whether they are external links, links pointing to a specific page on the site, or links pointing to a specific anchor or label.

External links are used for external hyperlinks:

`ReStructuredText <https://docutils.sourceforge.io/rst.html>`_

To link to another page on the site, use the :doc: role:

Use the :doc:`cli` for scriptable, repeatable actions with Aiven

The :doc: role uses the page title but if you want to change the link text, you can do so:

With an :doc:`API <api/index>` you can build any integration you choose

To create a label to link to a particular section (this is also useful if renaming titles that might have links pointing to the old wording), place the label immediately before the section heading:

.. _tools_cli_tips_tricks:

Tips and Tricks
===============

Then you can refer to the label with a :ref: entry:

There are some :ref:`_tools_cli_tips_tricks` to assist you.

Diagrams

Diagrams use sphinxcontrib-mermaid and mermaid.js syntax.

Sections and panels

We're using sphinx-panels for the card layout you see on the homepage and in a few other places. Please use sparingly :)

Code samples

Code samples should be autodetected (using pygments) and also will automatically include the "click to copy" button in the top right thanks to sphinx-copybutton.

Do not include a $ before a command that the user should run, because it will get copied into the user's clipboard and cause the command to fail (this has been a common standard in the past).

Importing content

Some of the content for DevPortal came from a previous incarnation of documentation. There is an import script to help with this process.

To set up the import tooling for the first time:

  • Install pandoc and make sure the command is in your path
  • Change into the utils/ directory
  • Run pip install -r requirements.txt

To bring in a page from the previous platform:

  • Run python import-help-article.py [paste a URL]
  • Take the resulting *.rst file and any images, and place them as appropriate in the file structure of the project

License

This work is licensed under a Creative Commons Attribution 4.0 International License.

About

Resources for users of the projects on the Aiven platform

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PLpgSQL 98.8%
  • Python 0.4%
  • HTML 0.3%
  • CSS 0.2%
  • JavaScript 0.1%
  • Java 0.1%
  • Other 0.1%