specific words cause the plugin to fail #7
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
luten/mkdocs-alias-plugin#7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
hello.
whenever I use the word "context" (upper or lowercase) in an alias definition under the frontmatter YAML of an mkdocs.yml file, the build process fails with the following error:
I'm using Python 3.11, mkdocs 1.5.3 with mkdocs-material 9.4.1
thanks!
Jorge
Interesting, I'll take a look!
it was really weird because I work with a few hundred files in the same folder and I was processing them automatically through another tool that inserts names of files as aliases in the same file. and everything was running fine until it hit a file called "somethingcontext.md". tested it with several files with the same results and ended up having to rename the alias to something like "ctx". maybe there's a reserved keyword, beats me, but the plugin is really useful (great work!) so I wanted to give you a heads-up anyway :)
Nope, a big dumb mistake on my end caused this. It was choking on every instance of an alias with the word "text" in it since I did something like:
Rather than:
D'oh! Aliases can be defined as strings or as dictionaries of strings and their default titles, but I wasn't checking for the correct data type :/
I just fixed this and pushed up a new version to PyPI, v0.7.1. Just pip install it as usual, but add the --upgrade flag, which should pull the latest version.
Please let me know if this fixes the issue, and I'll close the bug!
pretty dumb, yeah, and I should know because I made several of those in my programming life :) I hadn't even checked the code before I opened the issue, shame on me.
just tested 0.7.1 and it works fine now! thank you very much for the fix and for doing it lightning-fast!
Awesome, thanks for the report!1