1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-30 18:24:35 +01:00

Cleaned up documentation and migration guide

This commit is contained in:
squidfunk 2017-11-05 14:26:44 +01:00 committed by Martin Donath
parent 317d955663
commit 64a09ec0f2
3 changed files with 39 additions and 41 deletions

View File

@ -144,7 +144,7 @@ following variables:
theme: theme:
palette: palette:
primary: 'indigo' primary: 'indigo'
accent: 'light blue' accent: 'indigo'
``` ```
Color names are case-insensitive, but must match the names of the Material Color names are case-insensitive, but must match the names of the Material
@ -364,7 +364,7 @@ The default favicon can be changed by setting the `favicon` variable to an
``` yaml ``` yaml
theme: theme:
favicon: 'images/favicon.ico' favicon: 'assets/mages/favicon.ico'
``` ```
### Features ### Features
@ -392,8 +392,8 @@ To include a link to the repository of your project within your documentation,
set the following variables via your project's `mkdocs.yml`: set the following variables via your project's `mkdocs.yml`:
``` yaml ``` yaml
repo_name: 'my-github-handle/my-project' repo_name: 'squidfunk/mkdocs-material'
repo_url: 'https://github.com/my-github-handle/my-project' repo_url: 'https://github.com/squidfunk/mkdocs-material'
``` ```
The name of the repository will be rendered next to the search bar on big The name of the repository will be rendered next to the search bar on big
@ -450,7 +450,7 @@ will result in `fa fa-github`.
## Integrations ## Integrations
### Google Analytics integration ### Google Analytics
MkDocs makes it easy to integrate site tracking with Google Analytics. MkDocs makes it easy to integrate site tracking with Google Analytics.
Besides basic tracking, clicks on all outgoing links can be tracked as well as Besides basic tracking, clicks on all outgoing links can be tracked as well as
@ -463,7 +463,7 @@ google_analytics:
- 'auto' - 'auto'
``` ```
### Disqus integation ### Disqus
Material for MkDocs is integrated with [Disqus][22], so if you want to add a Material for MkDocs is integrated with [Disqus][22], so if you want to add a
comments section to your documentation set the shortname of your Disqus project comments section to your documentation set the shortname of your Disqus project
@ -471,7 +471,7 @@ in your `mkdocs.yml`:
``` yaml ``` yaml
extra: extra:
disqus: 'your-disqus-shortname' disqus: 'mkdocs-material'
``` ```
The comments section is inserted on *every page, except the index page*. The comments section is inserted on *every page, except the index page*.
@ -486,28 +486,6 @@ automatically included.
[22]: https://disqus.com [22]: https://disqus.com
## Migration
### From 1.x to 2.x
* Material for MkDocs 2.x requires MkDocs 0.17.1, as this version introduced
changes to the way themes can define options. The following variables inside
your project's `mkdocs.yml` need to be renamed:
* `extra.feature` becomes `theme.feature`
* `extra.palette` becomes `theme.palette`
* `extra.font` becomes `theme.font`
* `extra.logo` becomes `theme.logo`
* Favicon support has been dropped by MkDocs, it must now be defined in
`theme.favicon` (previously `site_favicon`).
* Localization is now separated into theme language and search language. While
there can only be a single language on theme-level, the search supports
multiple languages which can be separated by commas.
* The search tokenizer can now be set through `extra.search.tokenizer`.
## Extensions ## Extensions
MkDocs supports several [Markdown extensions][23]. The following extensions MkDocs supports several [Markdown extensions][23]. The following extensions
@ -547,17 +525,17 @@ Below is a full example configuration for a `mkdocs.yml`:
``` yaml ``` yaml
# Project information # Project information
site_name: 'My Project' site_name: 'Material for MkDocs'
site_description: 'A short description of my project' site_description: 'A Material Design theme for MkDocs'
site_author: 'John Doe' site_author: 'Martin Donath'
site_url: 'https://john-doe.github.io/my-project' site_url: 'https://squidfunk.github.io/mkdocs-material/'
# Repository # Repository
repo_name: 'my-github-handle/my-project' repo_name: 'squidfunk/mkdocs-material'
repo_url: 'https://github.com/john-doe/my-project' repo_url: 'https://github.com/squidfunk/mkdocs-material'
# Copyright # Copyright
copyright: 'Copyright © 2016 - 2017 John Doe' copyright: 'Copyright © 2016 - 2017 Martin Donath'
# Configuration # Configuration
theme: theme:
@ -569,17 +547,16 @@ theme:
font: font:
text: 'Roboto' text: 'Roboto'
code: 'Roboto Mono' code: 'Roboto Mono'
logo: 'images/logo.svg'
# Customization # Customization
extra: extra:
social: social:
- type: 'github' - type: 'github'
link: 'https://github.com/john-doe' link: 'https://github.com/squidfunk'
- type: 'twitter' - type: 'twitter'
link: 'https://twitter.com/john-doe' link: 'https://twitter.com/squidfunk'
- type: 'linkedin' - type: 'linkedin'
link: 'https://linkedin.com/in/john-doe' link: 'https://linkedin.com/in/squidfunk'
# Google Analytics # Google Analytics
google_analytics: google_analytics:

View File

@ -15,6 +15,27 @@ pip show mkdocs-material | grep -E ^Version
# Version 2.0.2 # Version 2.0.2
``` ```
### Material 1.x to 2.x
* Material for MkDocs 2.x requires MkDocs 0.17.1, as this version introduced
changes to the way themes can define options. The following variables inside
your project's `mkdocs.yml` need to be renamed:
* `extra.feature` becomes `theme.feature`
* `extra.palette` becomes `theme.palette`
* `extra.font` becomes `theme.font`
* `extra.logo` becomes `theme.logo`
* Favicon support has been dropped by MkDocs, it must now be defined in
`theme.favicon` (previously `site_favicon`).
* Localization is now separated into theme language and search language. While
there can only be a single language on theme-level, the search supports
multiple languages which can be separated by commas. See the getting started
guide for more guidance.
* The search tokenizer can now be set through `extra.search.tokenizer`.
## Changelog ## Changelog
### 2.0.2 <small>_ November 1, 2017</small> ### 2.0.2 <small>_ November 1, 2017</small>

View File

@ -22,7 +22,7 @@
site_name: Material for MkDocs site_name: Material for MkDocs
site_description: A Material Design theme for MkDocs site_description: A Material Design theme for MkDocs
site_author: Martin Donath site_author: Martin Donath
site_url: http://squidfunk.github.io/mkdocs-material/ site_url: https://squidfunk.github.io/mkdocs-material/
# Repository # Repository
repo_name: squidfunk/mkdocs-material repo_name: squidfunk/mkdocs-material