Your help center is built from blocks, so it takes the fonts, colors and spacing of your theme. In a block theme you change its layout in the Site Editor, without CSS.
Templates
DocsPress adds three templates to Appearance > Editor > Templates.
| Template | Shows |
|---|---|
| Help center home | The docs home at /docs/ with every product |
| Help center article | Each product’s home page and each article, with the sidebar, breadcrumbs and table of contents |
| Help center search | The full list of search results |
Each template holds your theme’s header, the Help center block and your theme’s footer. When your theme ships its own template with the same name, the theme’s template wins.
To change a template, open it in the Site Editor, select the Help center block, and change its settings in the sidebar. Click Save. Your saved templates stay when DocsPress updates.
Help center block settings
Layout
| Setting | What it does |
|---|---|
| Sidebar | Shows the product switcher, search and the list of articles on the left. On by default. |
| Table of contents | Shows On this page with the article’s headings, on wide screens. On by default. It appears when an article has at least two headings. |
| Content width | How wide the article text runs: Narrow, Default or Wide. Default is selected at first. |
Elements
| Setting | What it does |
|---|---|
| Breadcrumbs | Shows the product and collection above the article title. |
| Previous and next links | Shows links to the previous and next articles of the product under each article. |
| Was this page helpful? | Shows the Yes and No buttons under each article. |
| Copy page button | Shows Copy page under the article title, with Copy as Markdown and View as Markdown. |
All four are on by default.
Smaller blocks
To build your own layout, add the parts as separate blocks from the DocsPress category in the inserter: Product sidebar, Product switcher, Docs breadcrumbs, Table of contents, Copy page, Was this page helpful?, Previous and next and Collections index. The article parts show only on article pages.
Two patterns in the DocsPress category give you a start. Help center places the sidebar, the article and the table of contents. Product home places the breadcrumbs, the product title and its collections in two columns.
Phones
On narrow screens the sidebar folds into a Menu button above the article.
Classic themes
A classic theme has no Site Editor. DocsPress shows the help center between your theme’s header and footer, with the default settings above.
If your theme has its own DocsPress template files in a docspress folder, DocsPress keeps using them and shows the older 2.x layout. See Move from DocsPress 2.x.
Leave a Reply