rosscdh / mkdocs-markdownextradata-plugin

A MkDocs plugin that injects the mkdocs.yml extra variables into the markdown template
MIT License
83 stars 18 forks source link

Plugin not working with mkdocs 1.0.x #3

Closed dduportal closed 5 years ago

dduportal commented 5 years ago

Hello dear maintainer,

thanks for this cool plugin!

Just installed the version 0.0.5, with mkdocs 1.0.4 with success, and ran into this error:

ERROR   -  Config value: 'markdown_extensions'. Error: Failed to initiate extension 'markdownextradata': module 'markdownextradata' has no attribute 'makeExtension'

Reproduction:

ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.local/bin

COPY requirements.txt /mkdocs/ WORKDIR /mkdocs VOLUME /mkdocs

RUN apk --no-cache --no-progress add py3-pip \ && pip3 install --user -r requirements.txt


* `requirements.txt`:

mkdocs==1.0.4 pymdown-extensions==5.0 mkdocs-bootswatch==1.0 mkdocs-material==3.0.4 mkdocs-markdownextradata-plugin==0.0.5


* `mkdocs.yml`:

site_name: Foo site_description: Foo site_author: Foo site_url: https://foo.com dev_addr: 0.0.0.0:8000

docs_dir: 'content'

theme: name: 'material' custom_dir: 'theme' language: en include_sidebar: true favicon: assets/img/favicon.ico logo: assets/img/foo.png feature: tabs: false palette: primary: 'indigo' accent: 'blue' i18n: prev: 'Previous' next: 'Next'

copyright: "Copyright © foo"

markdown_extensions:

extra: fooVersion: 1.0.0

Page tree

nav:

rosscdh commented 5 years ago

Hi, thanks for the info. I'll try replicate and fix the issue this weekend.

rosscdh commented 5 years ago

Ok did a little initial investigation. 2 things

  1. Thanks for the great report, really well written and helped with resolution from text
  2. the problem is

you have:

markdown_extensions:
  - admonition
  - markdownextradata
....

it should be

plugins:
  - markdownextradata

markdown_extensions:
  - admonition
  - pymdownx.details
....

Remember its a "plugin" not an extension ;)

rosscdh commented 5 years ago

Best of luck with your project and thanks again for the report!

dduportal commented 5 years ago

Oh dear, thanks a lot, it works.

My apologizes for the noise

rosscdh commented 5 years ago

Great to hear absolutely no problem! Good luck with the project and drop a line if tethers is anything else

On Thu, 8 Nov 2018, 07:22 Damien Duportal <notifications@github.com wrote:

Oh dear, thanks a lot, it works.

My apologizes for the noise

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/rosscdh/mkdocs-markdownextradata-plugin/issues/3#issuecomment-436886455, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYPMr46jcBQ1LFeiUTA6l_qWXVZgc1Eks5us82egaJpZM4XJzPS .