docs custom-code
Shows whether custom code is on and how much CSS and HTML each slot holds. --json prints the code itself. There's no draft: a change is live on your docs site as soon as the command returns, the same as saving in API Studio. See custom code.
bash
octri docs custom-code [show | set key=value …]octri docs custom-code set key=value …
Sets the code your site loads, usually read from files with @. Saved code reaches readers only while custom code is on, so the command reminds you if enabled is still false.
Arguments
key=valuestringrequiredThe slots.
| Value | Meaning |
|---|---|
enabled | true or false |
css | A stylesheet |
headHtml | HTML added to each page's head |
bodyEndHtml | HTML added at the end of each page's body |
Examples
Show custom code
bash
octri docs custom-codeOutput
✔ Loading custom code
Custom code off
css empty
headHtml empty
bodyEndHtml empty
--json prints the code itselfLoad a stylesheet
bash
octri docs custom-code set css=@docs.css enabled=trueRelated
octri docs theme: Read and change appearance: colours, logo, fonts, layout and code themes.octri docs components: Push, show and remove the custom components your pages use.