jimporter / mike

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

Setting a subdirectory for the docs #120

Closed sammaphey closed 1 year ago

sammaphey commented 1 year ago

I notice in your readme you enable setting a --deploy-prefix when running mike deploy or a deploy_prefix in the plugins section, but I get these errors:

image

image

It looks like perhaps they are not present int he most recent release?

jimporter commented 1 year ago

If you're using the most recent release, this is the README you should look at. In 1.1.2, the flag is --prefix.

sammaphey commented 1 year ago

Ahh okay, thanks!

snoyiatk commented 1 year ago

Is there anyway to set default prefix via mkdocs.yml file? the deploy_prefix option defined in README doesn't work for me. The error is the same as this ticket: Config value: 'plugins'. Warning: ('deploy_prefix', 'Unrecognised configuration name: deploy_prefix') mkdocs version is 1.3.0 mike version 1.1.2 Here is my mkdocs yml file.

site_name: XXXSRS
site_url: !ENV [SITE_URL, 'http://xxx/']
use_directory_urls: false
repo_name: xxx/SRS
repo_url: https://xxx/SRS

theme:
  name: material
  custom_dir: overrides
  features:
    - navigation.instant
    - navigation.tracking
    - navigation.prune
    - navigation.top
    - search.suggest
    - search.highlight

extra_css:
  - stylesheets/extra.css

extra_javascript:
  - javascripts/extra.js

extra:
  version:
    provider: mike
    default: latest

plugins:
  - search
  - mike:
      deploy_prefix: 'public'
jimporter commented 1 year ago

Yes. As implied above, upgrade to the latest Git revision and use plugins.mike.deploy_prefix.

snoyiatk commented 1 year ago

Do you have any suggestion/comment on why my mkdocs configuration doesn't work :(

jimporter commented 1 year ago

You can't use plugins.mike.deploy_prefix on v1.1.2. As mentioned, you need the latest development version from Git if you want to use that. Otherwise, use --prefix on the command line.

bitsondatadev commented 1 year ago

@jimporter, any idea when the next release will be? It would be convenient to have the mkdocs config available to add to GitHub actions. Since you're running this for free, --prefix will do until you have time to cut a release. Thank you so much for this amazing tool!