nilobarp / docuapi

Beautiful multilingual API documentation theme for Hugo

Home Page:https://docuapi.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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).


Visit the demo site.


Screenshot DocuAPI Example site

Use

Note: this theme requires Hugo >= 0.56.0 to run. If you want to edit the SCSS styles, you need:

  • The extended Hugo version.
  • PostCSS CLI: npm install -g postcss-cli (TODO(bep) add a package.json)

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

When the fix for #2549 is released we may do this with blocks, but until then you can provide some custom partials:

  • partials/hook_head_end.html is inserted right before the head end tag. Useful for additional styles etc.
  • partials/hook_body_end.html which should be clear by its name.
  • partials/hook_left_sidebar_start.html the start of the left sidebar
  • partials/hook_left_sidebar_end.html the end of the left sidebar
  • partials/hook_left_sidebar_logo.html the log img source

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

  • partials/styles.html
  • partials/js.html

About

Beautiful multilingual API documentation theme for Hugo

https://docuapi.netlify.com/

License:Other


Languages

Language:HTML 42.1%Language:JavaScript 29.0%Language:CSS 25.5%Language:Makefile 3.3%