jimporter / mike

Manage multiple versions of your MkDocs-powered documentation via Git
BSD 3-Clause "New" or "Revised" License
553 stars 47 forks source link

Issue on extra install: unhashable type: 'CommentedMap' #9

Closed AdrienFromToulouse closed 6 years ago

AdrienFromToulouse commented 6 years ago

Hi!

Many thanks for maintaining that "plugin". I was looking for something similar for a while.

However when trying it I got an error upon executing this cmd:

mike install-extras

errror displayed

mike: unhashable type: 'CommentedMap'

The context:

mkdocs, version 0.17.3
Python 3.6.4
mike 0.3.1

Whatever the mkdocs.yml I am using I cannot get rid of this error...

Any thoughts?

Cheers!

jimporter commented 6 years ago

It works fine for me (and in the automated tests). Could you post your mkdocs.yml?

AdrienFromToulouse commented 6 years ago

@jimporter the mkdocs.yml is very basic:

site_name: REPLACEME
site_url: REPLACEME
site_dir: public
dev_addr: 0.0.0.0:80
repo_url: https://REPLACEME
edit_uri: edit/master/docs/
repo_name: Edit on REPLACEME

theme:
  name: material
  palette:
    primary: 'blue'
    accent: 'blue'
  logo: logo.png
extra:
  version: 1.0

plugins:
  - awesome-pages
  - search

No worries if you cannot found out. It might be due to my local setting.

Thanks for your time and reply anyway.

jimporter commented 6 years ago

This is fixed in 1c97545c5f130d920a6af73e5302ffdea51f132d, though it won't really help you much since mike doesn't support installing extras for the material theme. You can probably adapt the extras from the mkdocs theme though: https://github.com/jimporter/mike/tree/master/mike/themes/mkdocs

jimporter commented 6 years ago

And I've released this as v0.3.2.

I'd accept a PR to add extras for the material theme if you're interested, although I think in the long run, I'd prefer to have extras live in the repo for each theme (excluding the built-in MkDocs themes). That said, mike isn't exactly a well-known project yet, so I probably can't expect every theme author out there to add support for the extras.