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
The site is intended to be hosted behind two domains:
80
88
81
89
*`community.mydomain.com`: the primary domain to be used to serve the site
82
90
*`docs.mydomain.com`: used to provide links to the docs, particularly for the enterprise product documentation where a 'community' domain would not be appropriate.
83
91
84
-
It's an anti pattern to serve an SPA from multiple domains, and switch domains during routing. Configuration is non-trivial and the user experience is poor as a change of domain means a full reload of the SPA. Therefore, `docs.mydomain.com/productname` redirects to `community.mydomain.com/docs/productname` to achieve this.
92
+
It's an antipattern to serve an SPA from multiple domains, and switch domains during routing. Configuration is non-trivial and the user experience is poor as a change of domain means a full reload of the SPA. Therefore, `docs.mydomain.com/productname` redirects to `community.mydomain.com/docs/productname` to achieve this.
85
93
86
94
The following, minimal NGINX configuration is sufficient:
87
95
@@ -134,24 +142,24 @@ Follow these steps if you'd like to add docs to a new Deepfence project, and to
134
142
135
143
### Get the Skeleton Files
136
144
137
-
Check out the github repo you wish to add docs to.
145
+
Check out the GitHub repo you wish to add docs to.
138
146
139
147
Remove (back-up) any existing `/docs/` directory in the repo.
140
148
141
149
Copy `skel/docs` into the root of the repo, to create a new `/docs/` directory. This directory contains:
142
150
143
-
| Filename | Purpose |
144
-
|--------|-------|
145
-
|`docs/docusaurus.config.js`| Sample configuration for your docusaurus docs site |
146
-
|`docs/sidebars.js`| Sample sidebar for your documentation tree |
147
-
|`docs/README.md`| README for the docs in your new repo, with build instructions |
148
-
|`docs/docs/threatmapper`| Location for your docs files (must rename first) |
149
-
|`docs/docs/threatmapper/index.md`| Your first documentation file |
150
-
| In `docs/static:`<br/> `css/deepfence.css`,<br/> `img/deepfence-logo-black.svg`,<br/> `img/deepfence-logo-white.svg`| Styling for the deepfence skin for the `classic` theme |
151
-
|`docs/src/pages/index.md`| Default home page for Deepfence docs; no need to edit |
152
-
|`docs/yarn.lock`, `docs/package.json`| NPM package list, used when initialized with `yarn`|
153
-
|`docs/.gitignore`| Configuration to ignore node dependencies and temporary files |
|`docs/docusaurus.config.js`| Sample configuration for your docusaurus docs site|
154
+
|`docs/sidebars.js`| Sample sidebar for your documentation tree|
155
+
|`docs/README.md`| README for the docs in your new repo, with build instructions |
156
+
|`docs/docs/threatmapper`| Location for your docs files (must rename first)|
157
+
|`docs/docs/threatmapper/index.md`| Your first documentation file|
158
+
| In `docs/static:`<br/> `css/deepfence.css`,<br/> `img/deepfence-logo-black.svg`,<br/> `img/deepfence-logo-white.svg`| Styling for the deepfence skin for the `classic` theme |
159
+
|`docs/src/pages/index.md`| Default home page for Deepfence docs; no need to edit|
160
+
|`docs/yarn.lock`, `docs/package.json`| NPM package list, used when initialized with `yarn`|
161
+
|`docs/.gitignore`| Configuration to ignore node dependencies and temporary files |
162
+
|`docs/babel.config.js`| Babel config|
155
163
156
164
These are the basic skeleton files needed to create a local docs site.
157
165
@@ -168,14 +176,14 @@ Rename the `docs/threatmapper` directory to be product-appropriate, e.g. `packet
168
176
Edit `docusaurus.config.js` to make it product-appropriate. You'll want to replace:
169
177
170
178
1. config.title
171
-
1. config.tagline
172
-
1. config.presets.docs.editURL
173
-
1. themeconfig.navbar.items[0]
179
+
2. config.tagline
180
+
3. config.presets.docs.editURL
181
+
4. themeconfig.navbar.items[0]
174
182
175
183
Edit `sidebars.js`:
176
184
177
185
1. Replace the name of the sidebar object to the appropriate product name.
178
-
1. Correct the value in the `sidebar-title`
186
+
2. Correct the value in the `sidebar-title`
179
187
180
188
You will want to edit sidebars.js further, to define the nav structure of the documentation, but that can wait.
0 commit comments