Mkdocs-material: readthedocs

Created on 4 Sep 2016  路  7Comments  路  Source: squidfunk/mkdocs-material

I am trying to use the material theme on readthedocs. I was able to install it; but i still cannot get the material theme up; i get only the default. Any suggestions how to fix this?

Most helpful comment

I was able to install the mkdocs-material theme in RTD. Before the start the docs of my project are in /docs of my GitHub project. If your case is similar you can continue with the next steps:

  1. Create a requirements.txt file in /docs with mkdocs-material dependency:

  1. Create mkdocs.yml file to use mkdocs-material theme:
site_name: <site_name>
theme:
  name: material
  1. Create a readthedocs.yml file with the config to install dependencies and use mkdocs configuration:
version: 2

python:
  version: 3.7
  install:
    - requirements: docs/requirements.txt

mkdocs:
 configuration: mkdocs.yml

All 7 comments

Uh, I have absolutely no experience with getting it on RTD. If you find out, please write a step-by-step instruction, so we can add it to the documentation and everybody can benefit. Is it even possible? Does it state so in the documentation?

BTW: you can host on GitHub Pages. MkDocs supports this out-of-the-box. The Material documentation itself is hosted on GitHub Pages.

See: http://www.mkdocs.org/user-guide/deploying-your-docs/#github-pages

It works on github:

http://madsjulia.github.io/Mads.jl

But i also wanted to have it on RTD.

I like very much the material theme.

Hmm, I think this is a general issue with readthedocs. You should ask your question in regard to using custom themes in general here:
https://github.com/rtfd/readthedocs.org

I'm afraid I can't help you, but please tell us when you managed to do it. I will close this issue for now.

@montyvesselinov @squidfunk AFAIK you have to use the ReadTheDocs theme when hosting on readthedocs.org. You can customize that theme, at least you can when using Sphinx (instead of MkDocs), however, as per the MkDocs documentation it seems you may be stuck: https://github.com/mkdocs/mkdocs/blob/master/docs/user-guide/deploying-your-docs.md#read-the-docs

@montyvesselinov https://github.com/rtfd/readthedocs.org/issues/978 read this though...

I was able to install the mkdocs-material theme in RTD. Before the start the docs of my project are in /docs of my GitHub project. If your case is similar you can continue with the next steps:

  1. Create a requirements.txt file in /docs with mkdocs-material dependency:

  1. Create mkdocs.yml file to use mkdocs-material theme:
site_name: <site_name>
theme:
  name: material
  1. Create a readthedocs.yml file with the config to install dependencies and use mkdocs configuration:
version: 2

python:
  version: 3.7
  install:
    - requirements: docs/requirements.txt

mkdocs:
 configuration: mkdocs.yml
Was this page helpful?
0 / 5 - 0 ratings