You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A documentation template is always helpful. There are a lot of solutions to make one; we wanted to create our self-hosted version based on our favorite static site generator [Eleventy](https://www.11ty.dev/).
23
25
@@ -42,6 +44,52 @@ The template is built on [Spruce CSS](https://sprucecss.com/), a small and custo
42
44
-[svgIcon](https://github.com/conedevelopment/sprucecss-eleventy-documentation-template/blob/main/src/shortcodes/svg-icon.js) shortcode: render any SVG icon inline and add optional classes.
43
45
-[markdownRenderer](https://github.com/conedevelopment/sprucecss-eleventy-documentation-template/blob/main/src/shortcodes/markdown-render.js): render any string (markdown) into HTML.
44
46
47
+
## Setup
48
+
49
+
1.**Clone the repository.**
50
+
51
+
2.**Install the dependencies.**
52
+
53
+
In the `package.json` file, you will find all of the dependencies (and scripts) to install them using the following command:
54
+
55
+
```shell
56
+
npm install
57
+
```
58
+
59
+
3. **Run the development mode**
60
+
61
+
To run the development mode, use the `npm script`. This script will also watch for changes.
62
+
63
+
```shell
64
+
npm start
65
+
```
66
+
67
+
4. **Run the production mode**
68
+
69
+
Before you go live, you should use the production script to compress the Sass files.
70
+
71
+
```shell
72
+
npm run prod
73
+
```
74
+
75
+
You can find some more npm scripts in the [package.json](https://github.com/conedevelopment/sprucecss-eleventy-documentation-template/blob/main/package.json) that can be helpful.
76
+
77
+
## Content Managment
78
+
79
+
Adding content to the template is easy as almost everything is in Eleventy.
80
+
81
+
### The Basic Structure
82
+
83
+
Our base folder for the documentation pages is the `posts` folder. You must follow the folder structure, which means the `category` here. If you create a folder, you must make a list page with the same name as the folder. You must also create another `posts` folder under the `category` folder where your posts go. You must create the `posts.json` file that will parameter your `layout` and `permalink` values.
84
+
85
+
### Eleventy Navigation
86
+
87
+
The theme utilizes the [Eleventy Navigation plugin](https://www.11ty.dev/docs/plugins/navigation/), so you must explicitly set up the hierarchy. This is needed for the automatic sidebar navigation, the navigation order, and breadcrumb generation.
88
+
89
+
### Other Pages
90
+
91
+
To create simple pages, make a file directly under the `src` folder and configure it with the available front matter.
0 commit comments