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

WARNING - Config value 'plugins': Plugin 'mike' option 'alias_type': Unrecognised configuration name: alias_type #130

Closed ThinksFast closed 1 year ago

ThinksFast commented 1 year ago

Hello, I am trying to improve the SEO settings for a doc's implementation that is using mike. My goal is to have the latest version of the docs viewable on a static URL path, like /latest/*. I believe the correct way to do this is to use a config like this:

  - mike:
      alias_type: copy
      canonical_version: latest

However, both my fork and the parent project are getting this error during build (regardless of what alias_type is set to):

WARNING - Config value 'plugins': Plugin 'mike' option 'alias_type': Unrecognised configuration name: alias_type

And with the above config, nothing gets built in the /latest/ directory of the repo. Any suggestions on how to fix this?

Details

image

jimporter commented 1 year ago

The alias_type configuration option isn't available in the v1.1.2 release. You'd need to use the latest development build for that.

canonical_version also only adds the appropriate HTML tag to existing docs. It doesn't add any new files. To have a latest/ subdirectory, you'll need to specify latest as an alias via mike deploy or mike alias. This is covered in more detail in the README (see the link above).

ThinksFast commented 1 year ago

Ah, got it. Thanks for the quick reply! I made some changes to the deploy config and I think it's working the way I want it to.

And just to make sure I'm clear: alias_type: copy does the same thing as specifying latest as an alias and adding --no-redirect, correct?

I'm using this as the deploy statement:

mike deploy $STARLITE_VERSION latest --push --force --update-aliases --no-redirect -t "$STARLITE_VERSION (latest)"

jimporter commented 1 year ago

And just to make sure I'm clear: alias_type: copy does the same thing as specifying latest as an alias and adding --no-redirect, correct?

Correct.

I'm using this as the deploy statement:

mike deploy $STARLITE_VERSION latest --push --force --update-aliases --no-redirect -t "$STARLITE_VERSION (latest)"

I'd strongly recommend against using --force unless you're 100% sure you need it, for the same reason you generally wouldn't use git push --force. It's usually a sign that you're doing something risky, if not outright wrong.

jimporter commented 1 year ago

Closing this, as there have been no further comments in the past week. If you're still having issues though, feel free to reply back and I can reopen this.

athshean commented 1 year ago

The alias_type configuration option isn't available in the v1.1.2 release. You'd need to use the latest development build for that.

canonical_version also only adds the appropriate HTML tag to existing docs. It doesn't add any new files. To have a latest/ subdirectory, you'll need to specify latest as an alias via mike deploy or mike alias. This is covered in more detail in the README (see the link above).

How to use the latest development build? The docs don't say where this build can be installed from.

jimporter commented 1 year ago

How to use the latest development build? The docs don't say where this build can be installed from.

From the repository: https://docs.readthedocs.io/en/stable/guides/private-python-packages.html#from-a-git-repository