bep / docuapi

Beautiful multilingual API documentation theme for Hugo
https://docuapi.netlify.app/
Other
750 stars 200 forks source link

Netlify Status

DocuAPI is a beautiful multilingual API documentation theme for Hugo. This theme is built on top of the beautiful work of Robert Lord and others on the Slate project (Apache 2 License). The JS part has recently been rewritten from Jquery to AlpineJS.


Visit the demo site.


Screenshot DocuAPI Example site

Use

Import the theme in your Hugo config:

[[module.imports]]
path = "github.com/bep/docuapi/v2"

Note, if you want the older jQuery-version, replace the path with github.com/bep/docuapi.

If you want to edit the SCSS styles, you need:

See the exampleSite and more specific its site configuration for the available options.

Most notable: This theme will use all the (non drafts) pages in the site and build a single-page API documentation. Using weight in the page front matter is the easiest way to control page order.

If you want a different page selection, please provide your own layouts/index.html template.

You can customize the look-and-feel by adding your own CSS variables in assets/scss/docuapi_overrides.scss. See the exampleSite folder for an example.

Hooks

You can override the layouts by providing some custom partials:

The styles and Javascript import are also put in each partial and as such can be overridden if really needed:

Stargazers over time

Stargazers over time