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
For guidance on writing effective documentation, see
147
-
the style guide for the Layer5 docs.
145
+
For guidance on writing effective documentation, see the style guide for the Layer5 docs.
148
146
149
-
## Styling your content
147
+
### Overriding theme styles
150
148
151
149
The theme holds its styles in the [`assets/scss` directory](https://github.com/layer5io/docs/tree/master/assets/scss).
152
150
153
-
**Do not change these files**, they are not actually inside this repo, but are part of the [google/docsy](https://github.com/google/docsy) repo.
151
+
**Do not change these files**, they are not actually inside this repo, but are part of the [google/docsy](https://github.com/google/docsy) repo. These files are managed as a Git submodule and may be updated or replaced when the theme is upgraded. Any changes made directly to the theme files will be lost during updates and are not preserved in version control.
154
152
155
153
You can override the default styles and add new ones:
156
154
157
-
* In general, put your files in the project directory structure under `website` rather than in the theme directory.
158
-
Use the same file name as the theme does, and put the file in the same relative position.
159
-
Hugo looks first at the file in the main project directories, if present, then at the files under the theme directory.
160
-
For example, the Layer5 website's [`layouts/partials/navbar.html`](https://github.com/layer5io/docs/blob/master/layouts/partials/navbar.html)
161
-
overrides the theme's [`layouts/partials/navbar.html`](https://github.com/layer5io/docs/blob/master/themes/docsy/layouts/partials/navbar.html)
162
-
163
-
* You can update the Layer5 website's project variables in the [`_variables_project.scss` file](https://github.com/layer5io/docs/blob/master/assets/scss/_variables_project.scss).
164
-
Values in that file override the [Docsy variables](https://github.com/layer5io/docs/blob/master/themes/docsy/assets/scss/_variables.scss).
165
-
You can also use `_variables_project.scss` to specify your own values for any of the default [Bootstrap 4 variables](https://getbootstrap.com/docs/4.0/getting-started/theming/).
* To see some examples of styled images, take a look at the OAuth setup page in the Layer5 docs.
172
-
Search for `.png` in the [page source](https://raw.githubusercontent.com/layer5io/docs/master/content/en/docs/gke/deploy/oauth-setup.md).
155
+
* To override templates or layouts, place your files in the main project directory (e.g., `layouts/partials/`) instead of editing the theme files under `themes/docsy/`.
156
+
* Use the same file name and relative path as the theme. Hugo will look forfilesin the project first and fall back to the theme if no override is found.
157
+
158
+
For example, to override the theme’s navigation bar template:
* To customize SCSS variables, update the `_variables_project.scss` file in the `assets/scss/` directory. This file overrides the theme’s SCSS variables and can also be used to redefine Bootstrap variables.
164
+
* For adding custom CSS rules, use the `_styles_project.scss` file in the same `assets/scss/` directory.
By default, Markdown images are written like this:
169
+
```markdown
170
+

171
+
```
172
+
These are rendered with:
173
+
- `max-width: 70%` of the viewport
174
+
- `max-height: 80vh` of the viewport height
175
+
- centered block layout
179
176
180
-
The site's [front page](https://docs.layer5.io/):
177
+
This default styling works well for most landscape (horizontal) images. However, if an image is very tall, narrow, or otherwise looks awkward, you can override the default by embedding raw HTML and specifying a custom size:
181
178
182
-
* See the [page source](https://github.com/layer5io/docs/blob/master/content/en/).
183
-
* The CSS styles are in the [project variables file](https://github.com/layer5io/docs/blob/master/assets/scss/_variables_project.scss).
For each stable release, we create a new branch for the relevant documentation.
250
-
For example, the documentation forthe v0.2 stable release is maintainedin the [v0.2-branch](https://github.com/layer5io/docs/tree/v0.2-branch).
251
+
For example, the documentation forthe v0.2 stable release is maintainedin the `v0.2-branch`.
251
252
Each branch has a corresponding Netlify website that automatically syncs each merged PR.
252
253
253
254
The versioned sites follow this convention:
@@ -257,7 +258,6 @@ The versioned sites follow this convention:
257
258
*`vXXX-YYY.docs.layer5.io` points to the release at vXXX.YYY-branch
258
259
259
260
We also hook up each version to the dropdown on the website menu bar.
260
-
For information on how to update the website to a new version, see the [Layer5 release guide](https://github.com/layer5io/docs/blob/master/docs_dev/releasing.md#releasing-a-new-version-of-the-website).
261
261
262
262
Whenever any documents reference any source code, you should use the version shortcode in the links, like so:
0 commit comments