mkdocs: Cant override base.html

Description

Iv’e tried to override base.html as per the instructions but all I get is:

AttributeError: 'Theme' object has no attribute 'name'

Expected behavior

It should just work.

Actual behavior

AttributeError: 'Theme' object has no attribute 'name'

Steps to reproduce the bug

  1. Add a custom_dir to the mkdocs.yml
  2. Create the directory specified in custom_dir
  3. Copy base.html from material theme source to custom dir
  4. Modify base.html
  5. Build or Serve

Package versions

  • Python: 3.7.4
  • MkDocs: 1.0.4
  • Material: 4.4.0

Project configuration

site_name: xxxxx
nav:
    - Welcome: index.md
    - Setup: setup.md 
    - Documents: docs.md
    - Data: data.md
    - Agent: agent.md
    - About: about.md
theme: 
  name: 'material'
  custom_dir: 'theme'
  palette:
    primary: 'lime'
    accent: 'amber'
  font:
    text: 'Roboto'
    code: 'Roboto Mono'
  favicon: 'images/favicon.ico'
extra_css: 
  - 'styles/extra.css'   
#extra_javascript: 
#  - 'scripts/startup.js'
use_directory_urls: false 
site_dir: ../../../src/xxx/src/help

System information

  • OS: Windows 10
  • Browser: Chrome

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (8 by maintainers)

Commits related to this issue

Most upvoted comments

OMG. Im sorry. I realise now it’s in docs so path should be ./docs/theme_customisations. Im a dick.

That’s better but now getting:

jinja2.exceptions.TemplateSyntaxError: unexpected char '$' at 12825