jimporter / mike

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

config load issue after update to 2.1.0 #217

Closed andboss closed 2 months ago

andboss commented 2 months ago

Summary

Configuration for building with-pdf is not working. I cannot provide the whole config, but need support how to log the issue line / affected config key to investigate further.

error appears:

error: join() argument must be str, bytes, or os.PathLike object, not 'RoundTrippableTag'

Configuration and Logs

# base configuration for the page
INHERIT: !ENV [MKDOCS_FILE, 'mkdocs.yml']

plugins:
  # https://github.com/orzih/mkdocs-with-pdf
  with-pdf:
    enabled_if_env: ENABLE_PDF_EXPORT
    # verbose: true
    cover_subtitle: !ENV [PDF_COVER_SUBTITLE, SITE_DESCRIPTION, CI_PROJECT_ROOT_NAMESPACE, 'reusable-ci']
    # cover_logo: 'assets/images/logo.svg'
    toc_level: 3
    back_cover: true
    output_path: !ENV [PDF_OUTPUT_PATH, 'pdf/reusable-ci_use-mkdocs.pdf']
    custom_template_path: 'pdf-templates'
    # exclude pages for PDF rendering only, for global excludes see mkdocs-nav.yml
    #exclude_pages:
    #  - 'Appendix/*'

Steps to Reproduce

  1. call mike: poetry run mike deploy --config-file $CONFIG_FILE --deploy-prefix $SITE_DIR --branch $PAGES_BRANCH $PAGES_DEPLOY_NAME

Expected Behavior

It should build like version 2.0.0

jimporter commented 2 months ago

~This works fine for me, based on the config fragment you've posted.~ It's the INHERIT bit.

You can get backtraces via mike --debug <rest of args> though.

jimporter commented 2 months ago

This should be fixed in 3351d5f. Could you test it out? If it looks ok, I'll tag a new version.

andboss commented 2 months ago

@jimporter i have no access to my debug workspace now, but from code review especially the tests it looks good 👍

If there is a package for download or tagged version available i can try soon.

Thank You!

jimporter commented 2 months ago

@andboss Since it looks like you're using Poetry, you should be able to point the mike dependency to the correct commit in this Git repository: https://python-poetry.org/docs/dependency-specification/#git-dependencies

I think that would be equivalent from Poetry's POV to having a PyPI-published version.

andboss commented 2 months ago

... using this version:

    [tool.poetry.dependencies.mike]
    git = "https://github.com/jimporter/mike.git"
    rev = "3351d5f"

It works now 👍 🥳

THANKS!

jimporter commented 2 months ago

Thanks for checking. I've merged that commit and released v2.1.1 with the fix.