Skip to content

Commit

Permalink
rearranging toc title info
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf committed Oct 13, 2020
1 parent fe1bc4c commit 2e9f9c4
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 38 deletions.
40 changes: 40 additions & 0 deletions docs/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,43 @@ html_theme_options = {
...
}
```


## Add a header to your Table of Contents

If you'd like to add a header above a section of TOC links, use `:caption: My header text`
in your `toctree` directive for that section.


## Customize the logo, title, and favicon

You can customize the logo, title, and favicon of your site with the following Sphinx configuration in `conf.py`:

```python
html_title = "Your title"
html_logo = "path/to/logo.png"
html_favicon = "path/to/favicon.ico"
```

These will be placed in the top-left of your page.


## Add metadata open graph tags to your site

OpenGraph tags can be used to generate previews and descriptions of your
website. These will be automatically generated based on your page's content
and title. However, generating them requires knowing the full URL of your
website ahead of time.

To enable metadata tags for your documentation, use the following
configuration in `conf.py`:

```python
html_baseurl = "https://<your-site-baseurl>"
```

For example, the value of this field for this documentation is:

```python
html_baseurl = "https://sphinx-book-theme.readthedocs.io/en/latest/"
```
38 changes: 0 additions & 38 deletions docs/layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,41 +241,3 @@ html_theme_options = {
```

Each page that is in `expand_sections` will be expanded in your left TOC.

### Add a header to your TOC

If you'd like to add a header above a section of TOC links, use `:caption: My header text`
in your `toctree` directive for that section.

### Adding the home page to your TOC

If you'd like to have the home page listed in your TOC links, use the following
configuration in `conf.py`:

```python
html_theme_options = {
...
"home_page_in_toc": True
...
}
```

## Add metadata open graph tags to your site

OpenGraph tags can be used to generate previews and descriptions of your
website. These will be automatically generated based on your page's content
and title. However, generating them requires knowing the full URL of your
website ahead of time.

To enable metadata tags for your documentation, use the following
configuration in `conf.py`:

```python
html_baseurl = "https://<your-site-baseurl>"
```

For example, the value of this field for this documentation is:

```python
html_baseurl = "https://sphinx-book-theme.readthedocs.io/en/latest/"
```

0 comments on commit 2e9f9c4

Please sign in to comment.