# Mkdocs\_material in documenter

**URL:** <https://discourse.julialang.org/t/mkdocs-material-in-documenter/13764>\
**Category:** Tooling\
**Tags:** documenter\
**Created:** [August 20, 2018, 1:57pm UTC](https://discourse.julialang.org/t/mkdocs-material-in-documenter/13764 "2018-08-20T13:57:46Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [August 20, 2018, 1:57pm UTC](https://discourse.julialang.org/t/mkdocs-material-in-documenter/13764/1 "2018-08-20T13:57:46Z")

</div>

I’ve a question on mkdocs run in Documenter on Travis - the mkdocs-material theme fails with the message

```julia
Downloading https://files.pythonhosted.org/packages/03/11/8ab0881bb6fe76e22d636c8327e86c2738f0d96f0d2145fec7e4fa7de9df/mkdocs_material-3.0.3-py2.py3-none-any.whl (574kB)
Collecting mkdocs>=1 (from mkdocs-material)
  Could not find a version that satisfies the requirement mkdocs>=1 (from mkdocs-material) (from versions: 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.10, 0.11, 0.11.1, 0.12.0, 0.12.1, 0.12.2, 0.13.0, 0.13.1, 0.13.2, 0.13.3, 0.14.0, 0.15.0, 0.15.1, 0.15.2, 0.15.3, 0.16.0, 0.16.1, 0.16.2, 0.16.3, 0.17.0, 0.17.1, 0.17.2, 0.17.3, 0.17.4, 0.17.5)
No matching distribution found for mkdocs>=1 (from mkdocs-material)
You are using pip version 9.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
ERROR: LoadError: failed process: Process(`pip install --user mkdocs-material`, ProcessExited(1)) [1]
Stacktrace:
 [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42
 [2] pipeline_error at ./process.jl:695 [inlined]
 [3] #run#505(::Bool, ::Function, ::Cmd) at ./process.jl:653
 [4] run at ./process.jl:651 [inlined]
 [5] pip(::String, ::Vararg{String,N} where N) at /home/travis/.julia/packages/Documenter/bK0Xg/src/Deps.jl:34
 [6] top-level scope at none:0
 [7] include at ./boot.jl:317 [inlined]
 [8] include_relative(::Module, ::String) at ./loading.jl:1038
 [9] include(::Module, ::String) at ./sysimg.jl:29
 [10] include(::String) at ./client.jl:388
 [11] top-level scope at none:0
in expression starting at /home/travis/build/JuliaPlots/PlotDocs.jl/docs/make.jl:5

```

The offending line in make.jl is `deps = Deps.pip("mkdocs", "mkdocs-material" ,"python-markdown-math", "pygments", "pymdown-extensions")`  
Does mkdocs-material not work anymore, or am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [August 20, 2018, 3:06pm UTC](https://discourse.julialang.org/t/mkdocs-material-in-documenter/13764/2 "2018-08-20T15:06:18Z")

</div>

What’s the Python version? The `python_requires` for mkdocs is [mkdocs/setup.py at master · mkdocs/mkdocs · GitHub](https://github.com/mkdocs/mkdocs/blob/master/setup.py#L66).  
MkDocs 1.0 does indeed exist on pip [mkdocs · PyPI](https://pypi.org/project/mkdocs/).

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [August 20, 2018, 4:17pm UTC](https://discourse.julialang.org/t/mkdocs-material-in-documenter/13764/3 "2018-08-20T16:17:11Z")

</div>

How do I find out? this is on Travis and we seem to not be specifying the python version. It doesn’t complain when I run it on my local machine.

---

<div class="post-metadata">

**Author:** ![mortenpi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mortenpi/32/158_2.png) [@mortenpi](https://discourse.julialang.org/u/mortenpi)\
**Post date:** [August 20, 2018, 9:36pm UTC](https://discourse.julialang.org/t/mkdocs-material-in-documenter/13764/4 "2018-08-20T21:36:26Z")

</div>

This came up once before already. I don’t know if @Datseris figured out the solution.

But yes, the problem is that the Python version on Travis is like ~2.7.3 or something, whereas MkDocs 1.0 needs at least 2.7.9, so it installs an older MkDocs. However, the latest `mkdocs-material` needs MkDocs 1.0., so it fails to install All in all, it looks like `pip` just spectacularly fails to resolve versions here.

Specifying the versions of MkDocs and `mkdocs-material` by hand might work. You could try passing

```julia
deps = Deps.pip("mkdocs==0.17.5", "mkdocs-material==2.9.4" ,"python-markdown-math", "pygments", "pymdown-extensions")

```

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [August 21, 2018, 10:21am UTC](https://discourse.julialang.org/t/mkdocs-material-in-documenter/13764/5 "2018-08-21T10:21:43Z")

</div>

That fixed it - thank you!

---

<div class="post-metadata">

**Author:** ![shipengcheng1230](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shipengcheng1230/32/4089_2.png) [@shipengcheng1230](https://discourse.julialang.org/u/shipengcheng1230)\
**Post date:** [January 2, 2019, 6:53pm UTC](https://discourse.julialang.org/t/mkdocs-material-in-documenter/13764/6 "2019-01-02T18:53:09Z")

</div>

I am now following [use-conda-with-travis-ci](https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html) to use the latest `Mkdocs`.

---

<div class="post-metadata">

**Author:** ![thofma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thofma/32/1691_2.png) [@thofma](https://discourse.julialang.org/u/thofma)\
**Post date:** [January 3, 2019, 11:41am UTC](https://discourse.julialang.org/t/mkdocs-material-in-documenter/13764/7 "2019-01-03T11:41:06Z")

</div>

Do you have a public package where this is working? I would like to peek at your `travis.yml`.

---

<div class="post-metadata">

**Author:** ![shipengcheng1230](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shipengcheng1230/32/4089_2.png) [@shipengcheng1230](https://discourse.julialang.org/u/shipengcheng1230)\
**Post date:** [January 3, 2019, 3:32pm UTC](https://discourse.julialang.org/t/mkdocs-material-in-documenter/13764/8 "2019-01-03T15:32:29Z")

</div>

Hi, it isn’t public yet but I paste them below:

```nohighlight
## Documentation: http://docs.travis-ci.com/user/languages/julia/
language: julia
os:
  - linux
  - osx
julia:
  - 1.0
  - nightly
matrix:
  allow_failures:
    - julia: nightly
  fast_finish: true
notifications:
  email: false
branches:
  only:
    - master
    - /^v[0-9]+\.[0-9]+\.[0-9]+$/
after_success:
  - julia --project=test/coverage -e 'using Pkg; Pkg.instantiate()'
  - julia --project=test/coverage test/coverage/coverage.jl
jobs:
  include:
    - stage: "Documentation"
      julia: 1.0
      os: linux
      install:
        # mkdocs-material isn't available at the default py2 on travis-ci for now
        - sudo apt-get update
        - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
        - bash miniconda.sh -b -p $HOME/miniconda
        - export PATH="$HOME/miniconda/bin:$PATH"
        - conda config --set always_yes yes --set changeps1 no
        - conda update -q conda
        - conda info -a
      script:
        - julia --project=docs -e 'using Pkg; Pkg.instantiate(); Pkg.add(PackageSpec(path=pwd()))'
        - julia --project=docs --color=yes docs/make.jl
      after_success: skip

```

So basically it uses miniconda3 after installation and path exportation so it has no problem with the latest Mkdocs. You may also check [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions), there are lots of useful stuff working with mkdocs-material.

---

<div class="post-metadata">

**Author:** ![thofma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thofma/32/1691_2.png) [@thofma](https://discourse.julialang.org/u/thofma)\
**Post date:** [January 3, 2019, 3:46pm UTC](https://discourse.julialang.org/t/mkdocs-material-in-documenter/13764/9 "2019-01-03T15:46:20Z")

</div>

Thanks a lot! This is super useful.

---

<div class="post-metadata">

**Author:** ![Cory\_Simon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cory_simon/32/3950_2.png) [@Cory\_Simon](https://discourse.julialang.org/u/Cory_Simon)\
**Post date:** [February 13, 2020, 1:01am UTC](https://discourse.julialang.org/t/mkdocs-material-in-documenter/13764/10 "2020-02-13T01:01:50Z")

</div>

this link is broken.  
`deps = Deps.pip("mkdocs==0.17.5", "mkdocs-material==2.9.4" ,"python-markdown-math", "pygments", "pymdown-extensions")` does not work for me.  
neither does that `jobs` section of the `travis.yml` file.

> <https://github.com/SimonEnsemble/Controlz.jl/blob/main/.travis.yml>

---

<div class="post-metadata">

**Author:** ![shipengcheng1230](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shipengcheng1230/32/4089_2.png) [@shipengcheng1230](https://discourse.julialang.org/u/shipengcheng1230)\
**Post date:** [February 14, 2020, 8:42pm UTC](https://discourse.julialang.org/t/mkdocs-material-in-documenter/13764/11 "2020-02-14T20:42:18Z")

</div>

I wouldn’t notice that at all without your mention.

The reason is that in my .yml file `matrix` is an alias of `job` (which is recommended to use now), thus it overwrites the `job` below, so the documentation job won’t be executed. To fix that, you may merge the two section together.
