Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nginxinc/nginx-hugo-theme
A hugo theme for NGINX documentation
https://github.com/nginxinc/nginx-hugo-theme
Last synced: about 2 months ago
JSON representation
A hugo theme for NGINX documentation
- Host: GitHub
- URL: https://github.com/nginxinc/nginx-hugo-theme
- Owner: nginxinc
- License: apache-2.0
- Created: 2023-03-20T16:41:14.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-25T10:15:19.000Z (2 months ago)
- Last Synced: 2024-10-25T16:31:05.463Z (2 months ago)
- Language: CSS
- Size: 10.7 MB
- Stars: 7
- Watchers: 9
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
- Support: SUPPORT.md
Awesome Lists containing this project
README
# nginx-hugo-theme
A documentation theme for F5 NGINX projects using [Hugo](https://gohugo.io/).
## Installation
1. Add the `nginx-hugo-theme` theme as a module mount to your project's config file:
```toml
[module]
[[module.imports]]
path="github.com/nginxinc/nginx-hugo-theme"
```## Usage
### Create a new doc
Run `hugo new ` to add a new doc.
> Using the `hugo new` command adds *all* of our pre-configured frontmatter to the new file.
### Build the docs
- Run `hugo` to build static HTML for your docs.
- Run `hugo server` to run the Hugo development server, so you can watch your changes as you work.
Open `localhost:1313` (`127.0.0.1:1313`) in a browser window to view the docs.### Shortcodes
See [Hugo Shortcodes](https://gohugo.io/content-management/shortcodes/) for an overview.
This theme contains the following custom shorcodes:
**Callouts**:
- caution.html
- important.html
- note.html
- see-also.html
- tip.html
- warning.html**Formatting**:
- collapse.html - Make a collapsible section.
- details-disclosure.html - Renders information inside a toggleable element (open by default but can be toggled in/out of visibility).
- comment.html - Insert a comment that won't be rendered at build time.
- raw-html.html - Insert raw HTML into a markdown doc.**Custom data**:
- openapi.html - Render an OpenAPI spec using ReDoc.
- metrics.html - Imports data from a JSON file and presents it in table format.
- ghcode.html - Rendering code from github#### `ghcode` example
To render code directly from github at build time, you can use the `ghcode` shortcode._Param 1_ - The url for the `raw` github file you want to render
_Param 2_ - Options for highlighting following Hugo's [Highlight shortcode](https://gohugo.io/content-management/syntax-highlighting/#highlight-shortcode)
```
{{< ghcode "https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/refs/heads/main/examples/custom-resources/access-control/access-control-policy-allow.yaml" "hl_lines=4" >}}
```### Includes
This theme contains a custom shortcode called "includes" that lets you reuse content.
To use this shortcode:
1. Add an "includes" folder to the folder that contains your site content (for example, `content/includes`).
2. In the includes folder, create an `index.md` file and add these lines:```text
---
headless: true
---
```You can reuse the content of any file in the includes directory using the following shortcode syntax:
```md
{{< include "filename.md" >}}
```