|
1 | | -# NGINX Template Repository |
| 1 | +# nginx-hugo-theme |
2 | 2 |
|
3 | | -## How do I use this template? |
| 3 | +A documentation theme for F5 NGINX projects using [Hugo](https://gohugo.io/). |
4 | 4 |
|
5 | | -**DO NOT FORK** -- this template is meant to be used from the **[`Use this template`](https://github.com/nginxinc/template-repository/generate)** feature. |
| 5 | +## Installation |
6 | 6 |
|
7 | | -1. Click on **[`Use this template`](https://github.com/nginxinc/template-repository/generate)** |
8 | | -2. Give a name to your project |
9 | | -3. Wait until the first run of CI finishes (Github Actions will process the template and commit to your new repo) |
10 | | -4. Clone your new project and happy coding! |
| 7 | +1. Add the `nginx-hugo-theme` theme as a module mount to your project's config file: |
11 | 8 |
|
12 | | -**NOTE**: **WAIT** until the first CI run on GitHub Actions before cloning your new project. |
| 9 | + ```toml |
| 10 | + [module] |
| 11 | + [[module.imports]] |
| 12 | + path="github.com/nginxinc/nginx-hugo-theme" |
| 13 | + ``` |
13 | 14 |
|
14 | | -## What is included on this template? |
| 15 | +## Usage |
15 | 16 |
|
16 | | -This template includes all the scaffolding you need to get started on a standards compliant NGINX repository: |
| 17 | +### Create a new doc |
17 | 18 |
|
18 | | -- Standard license for NGINX OSS projects |
19 | | -- Standard `.gitignore` with minimal defaults |
20 | | -- Issue and PR templates |
21 | | -- Contributing guidelines |
22 | | -- Support guidelines |
23 | | -- Security guidelines for reporting major vulnerabilities |
24 | | -- NGINX Code of Conduct |
25 | | -- README placeholder |
26 | | -- Changelog placeholder |
27 | | -- Codeowners placeholder |
| 19 | +Run `hugo new <path/doc-title.md>` to add a new doc. |
28 | 20 |
|
29 | | ---- |
| 21 | +> Using the `hugo new` command adds *all* of our pre-configured frontmatter to the new file. |
30 | 22 |
|
31 | | -<!-- DELETE THE LINES ABOVE THIS AND WRITE YOUR PROJECT README BELOW -- PLACEHOLDER SECTIONS HAVE BEEN INCLUDED FOR YOUR CONVENIENCE --> |
| 23 | +### Build the docs |
32 | 24 |
|
33 | | -# nginx_hugo_theme |
| 25 | +- Run `hugo` to build static HTML for your docs. |
| 26 | +- Run `hugo server` to run the Hugo development server, so you can watch your changes as you work. |
| 27 | + Open `localhost:1313` (`127.0.0.1:1313`) in a browser window to view the docs. |
34 | 28 |
|
35 | | -## Requirements |
| 29 | +### Shortcodes |
36 | 30 |
|
37 | | -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam elit turpis, varius et arcu elementum, viverra rhoncus sem. Aliquam nec sodales magna, et egestas enim. Mauris lobortis ultrices euismod. Pellentesque in arcu lacus. Mauris cursus laoreet nulla, ac vehicula est. Vestibulum eu mauris quis lorem consectetur aliquam ac nec quam. Vestibulum commodo pharetra mi, at bibendum neque faucibus ut. Mauris et tortor sed sem consectetur eleifend ut non magna. Praesent feugiat placerat nibh, varius viverra orci bibendum sed. Vestibulum dapibus ex ut pulvinar facilisis. Quisque sodales enim et augue tempor mattis. Suspendisse finibus congue felis, ac blandit ligula. Praesent condimentum ultrices odio quis semper. Nunc ultrices, nibh quis mattis pellentesque, elit nulla bibendum felis, quis dapibus erat turpis ac urna. |
| 31 | +See [Hugo Shortcodes](https://gohugo.io/content-management/shortcodes/) for an overview. |
38 | 32 |
|
39 | | -## Getting Started |
| 33 | +This theme contains the following custom shorcodes: |
40 | 34 |
|
41 | | -Duis sit amet sapien vel velit ornare vulputate. Nulla rutrum euismod risus ac efficitur. Curabitur in sagittis elit, a semper leo. Suspendisse malesuada aliquam velit, eu suscipit lorem vehicula at. Proin turpis lacus, semper in placerat in, accumsan non ipsum. Cras euismod, elit eget pretium laoreet, tortor nulla finibus tortor, nec hendrerit elit turpis ut eros. Quisque congue nisi id mauris molestie, eu condimentum dolor rutrum. Nullam eleifend elit ac lobortis tristique. Pellentesque nec tellus non mauris aliquet commodo a eu elit. Ut at feugiat metus, at tristique mauris. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; |
| 35 | +**Callouts**: |
42 | 36 |
|
43 | | -## How to Use |
| 37 | +- caution.html |
| 38 | +- important.html |
| 39 | +- note.html |
| 40 | +- see-also.html |
| 41 | +- tip.html |
| 42 | +- warning.html |
44 | 43 |
|
45 | | -Maecenas at vehicula justo. Suspendisse posuere elementum elit vel posuere. Etiam quis pulvinar massa. Integer tempor semper risus, vitae maximus eros ullamcorper vitae. In egestas, ex vitae gravida sodales, ipsum dolor varius est, et cursus lorem dui a mi. Morbi faucibus ut nisi id faucibus. Sed quis ullamcorper ex. In et dolor id nunc interdum suscipit. |
| 44 | +**Formatting**: |
46 | 45 |
|
47 | | -## Contributing |
| 46 | +- collapse.html - Make a collapsible section. |
| 47 | +- comment.html - Insert a comment that won't be rendered at build time. |
| 48 | +- raw-html.html - Insert raw HTML into a markdown doc. |
48 | 49 |
|
49 | | -Please see the [contributing guide](https://github.com/nginxinc/nginx-hugo-theme/blob/main/CONTRIBUTING.md) for guidelines on how to best contribute to this project. |
| 50 | +**Custom data**: |
50 | 51 |
|
51 | | -## License |
| 52 | +- openapi.html - Render an OpenAPI spec using ReDoc. |
| 53 | +- metrics.html - Imports data from a JSON file and presents it in table format. |
| 54 | + |
| 55 | +### Includes |
| 56 | + |
| 57 | +This theme contains a custom shortcode called "includes" that lets you reuse content. |
| 58 | +To use this shortcode, you must add an "includes" folder to the folder that contains your site content (e.g., `content/includes`). |
| 59 | + |
| 60 | +You can reuse the content of any file in the includes directory using the following shortcode syntax: |
| 61 | + |
| 62 | +```md |
| 63 | +{{< include "filename.md" >}} |
| 64 | +``` |
52 | 65 |
|
53 | | -[Apache License, Version 2.0](https://github.com/nginxinc/nginx-hugo-theme/blob/main/LICENSE) |
54 | 66 |
|
55 | | -© [F5, Inc.](https://www.f5.com/) 2023 |
|
0 commit comments