Closed squidfunk closed 1 year ago
The Python release does not work due to a problem with our new build system, hatch. @ofek, could you please take a look? Otherwise I need to revert to setup.py
, again... For the time being, the release needs to be installed via git
.
Edit: nope, even installing from git
didn't work for me. I'm throwing out hatch again until this is resolved...
What commit made CI suddenly fail?
As you can see here, the version determination logic failed again. Probably due to the beta version modifier.
@agoose77
@squidfunk the schema (well, REGEX) that hatch-nodejs-version
follows for package.json
is major.minor.patch-pre.?ident...
. This is taken from the semver specification
Are you able to change your package.json
version to be 9.0.0-b0
?
No, there's no dash, it's just 9.0.0b1
, since it wouldn't be compatible with PEP 440. Or does hatch-nodejs-version
convert it to a PEP-compatible format? It would however mean that we would have a dash at some points of our application, and no dash in others.
@squidfunk but this is used for package.json
, right? hatch-nodejs-version
converts between semver and PEP440 representations. Also, note that 9.0.0b1
isn't valid for package.json
, whereas 9.0.0-b1
is valid for PEP440.
Yes, it is used in package.json
. Hmm. I've used the same approach I did as for all other beta releases before, but I guess we could maybe use the versioning package.json
expects. Unfortunately, I'm not an expert in hatch
. @ofek has introduced it to this repository and I just wanted to make a beta release. I'll consult you guys next time I try to diverge from normal semantic versioning identifiers 😬
Also, note that 9.0.0b1 isn't valid for package.json, whereas 9.0.0-b1 is valid for PEP440.
From the PEP 440 spec, it wasn't apparent to me that it is valid. Nevermind, here it is. With that lesson learned, I'll swap out setuptools for hatch next time I work on this repository again. Thanks for your time, guys!
Ha, all this stuff is a little bit fiddly. I'm not an expert, but I try to follow the standards where given, so that's informing my position. To add some context; I develop hatch-nodejs-version
, which fits into the plugin ecosystem that @ofek's hatch has build.
It might be possible to add an option to preserve the dash if we needed, but I'd prefer not to as it adds more complexity, where currently the code is quite simple (and therefore understandable).
From the PEP 440 spec, it wasn't apparent to me that it is valid.
I note that you found the pre-release-separator
section, but I agree. The PEP is surprisingly cryptic here. I noticed that section only after checking the regex.
I'm having a issue with the latest git build as instructed to use in another issue...
pip install https://github.com/squidfunk/mkdocs-material/archive/feature/material-v9.zip
Trying to use a custom toc permalink character breaks...
site_name: test
strict: true
theme:
name: material
markdown_extensions:
- toc:
permalink: "#"
## one
## two
Python 3.11.1 Windows 10 22H2 Firefox 107.0.1
maybe use the versioning
package.json
expects
Yes that is the fix
Trying to use a custom toc permalink character breaks...
I see this as well, even just reverting to
- toc:
permalink: true
Still ends up rendering a {'permalink': True}
:
Still ends up rendering a
{'permalink': True}
Fixed in 3e9b72c10! This was a search + replace error.
After upgrading to 9.0.0b3 am getting "tags" plugin not installed. Anyone noticed?
@shanthisagar-dhanya-kumar-db I'm not seeing this problem, the built-in tags plugin works fine. Could you please try and create a minimal reproduction? You could then attach it here as a zip and I'll have a look.
The latest commits fix highlighting of tags and improve the URL when using search sharing. Furthermore, now, the full range of Lunr.js query syntax is supported! I've reordered how the search query is preprocessed and ensured that only search terms (not modifiers) are sent through the transformation and tokenization pipeline. This lays the foundation for more interesting features to come.
pip install mkdocs-material==9.0.0b4
When releasing the stable version, I'll expand in a blog article on the new capabilities and how it works.
The global n
/p
nagivation keys seemed to have stopped working in this version, compared to the git master version.
However f
//
to search still seems to work
Did you re-enable the footer navigation (see OP)? The n/p
keys otherwise have no idea what the previous or next page is.
As mentioned in #4755, the new version fails to build the site if the feedback URL uses nameless placeholders:
ERROR - Error building page 'docs/index.md': Replacement index 0 out of range for positional args tuple
Traceback (most recent call last):
[...]
{% include "partials/feedback.html" %}
File "/home/kilian/.local/lib/python3.10/site-packages/material/partials/feedback.html", line 35, in top-level template code
{{ rating.note.format(url = url, title = title) }}
IndexError: Replacement index 0 out of range for positional args tuple
Using the new format is now mandatory.
Thanks @kcgthb, I updated the OP.
@guusw the next/previous page navigation should now work regardless of whether the footer is present or not. I've moved it into the head in 763423d30, which makes more sense anyway.
Hello! I wanted to inquire if this could be a possible bug/issue with the new search plugin. In our production build mkdocs-material==8.5.10
pages primarily containing markdown tables would render only a small snippet in the search preview.
In testing, 9.0.0b4
the search preview returns a rather large wall of text (often taking priority over other pages). One of our devs performing some tests noticed the issue linked in the comment below where it can best be seen:
For reference I've tested it by searching locally and on our vercel preview.
A small working around is to enable search.boost
on certain pages. Which is what I've done currently with the search query in the comment above to bring the discontinuity
page higher in the results.
I've personally tested this with a stripped-down version of our production config (no plugins, features beyond search).
mkdocs-material==9.0.0b4
mkdocs==1.4.2
python==3.10.8
Any insight if this is as intended and if utilizing search.boost
is the way to go? Please let me know if I can provide anymore resources.
Project Staging Link for the above PR.
@Valastiri thanks for reporting. This is not a bug. Search previews might now be larger, as they are cut at paragraphs and lists, and are not truncated anymore. If truncation is wished, one can do so by using CSS (see below), but some users might not like that. More compact search summaries are an improvement that is on the roadmap and tracked in #4278.
If you want the previous behavior, you can add the following additional CSS which will clamp search after 3 lines:
.md-search-result .md-typeset {
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
Compact search previews are very hard to support for all languages that we support in Material for MkDocs (50+ languages). However, with the new tokenization approach, they finally became possible. See the paragraph on accurate highlighting why this is hard. I will soon start working on this new feature.
@Valastiri thanks for reporting. This is not a bug. Search previews might now be larger, as they are cut at paragraphs and lists, and are not truncated anymore. If truncation is wished, one can do so by using CSS, but some users might not like that. More compact search summaries are an improvement that is on the roadmap and tracked in #4278.
Thanks! Good to know. Appreciate the response and all the work on Material thus far :). Love the platform/theme.
Hi @squidfunk, I'm the developer of mkdocs-newsletter
and as some users above the next and previous buttons disappeared from my site breaking the tests. I'm using 763423d30 to build this site.
I've read the comments in this issue and the related ones but found no clear steps to re-enable them, can you help me?
Thanks for maintaining this project so well, it's awesome, both docs, quality, release process...
Please read the original post, the one at the top. It clearly explains what to do. Excerpt:
Enable navigation footer: the previous and next buttons in the footer are now opt-in. If you wish to keep them for your documentation, add the following lines to
mkdocs.yml
:theme: features: - navigation.footer
Some users wished to disable the footer for a long time, which is why it is now opt-in.
Thanks for maintaining this project so well, it's awesome, both docs, quality, release process...
Thanks! Trying my best to stay atop of things. This wouldn't be possible without our awesome sponsors ❤️
Oh sorry, I didn't understood what OP meant. That fixed the issue
Thanks for everybody testing the beta so far! Since it's impossible to predict what will break down the line, I don't think it's a good idea to push this out before Christmas or even NYE. People are busy getting presents, and, in Germany, meeting in the evening to drink some Glühwein, so it's probably not a good idea to impose such a major change upon them right now. We'll move v9 out of beta at the beginning of next year.
If you already want to try it, no problem, just install the beta (see OP) and see if you run into any problems. You can already fix them on a separate branch, and then later, when v9 is out, just remove the b
release modifier and you're done.
Final release date will be January 2, 2023.
@facelessuser GitHub action workflow output gave me this with mkdocs-material==9.0.0b4
:
2022-12-19T21:39:33.6720468Z INFO - DeprecationWarning: 'uslugify' is deprecated. 'uslugify' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.
2022-12-19T21:39:33.6722291Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/markdown/extensions/toc.py", line 285, in run
2022-12-19T21:39:33.6723168Z el.attrib["id"] = unique(self.slugify(innertext, self.sep), used_ids)
2022-12-19T21:39:33.6725013Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/pymdownx/util.py", line 315, in _deprecated_func
2022-12-19T21:39:33.6725578Z warnings.warn(
2022-12-19T21:39:33.6725785Z
2022-12-19T21:39:33.7063129Z INFO - DeprecationWarning: 'uslugify' is deprecated. 'uslugify' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.
2022-12-19T21:39:33.7064833Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/markdown/extensions/toc.py", line 285, in run
2022-12-19T21:39:33.7065893Z el.attrib["id"] = unique(self.slugify(innertext, self.sep), used_ids)
2022-12-19T21:39:33.7074498Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/pymdownx/util.py", line 315, in _deprecated_func
2022-12-19T21:39:33.7075742Z warnings.warn(
2022-12-19T21:39:33.7076394Z
2022-12-19T21:39:33.7167402Z INFO - DeprecationWarning: 'uslugify' is deprecated. 'uslugify' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.
2022-12-19T21:39:33.7170035Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/markdown/extensions/toc.py", line 285, in run
2022-12-19T21:39:33.7176540Z el.attrib["id"] = unique(self.slugify(innertext, self.sep), used_ids)
2022-12-19T21:39:33.7177970Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/pymdownx/util.py", line 315, in _deprecated_func
2022-12-19T21:39:33.7268187Z warnings.warn(
2022-12-19T21:39:33.7268910Z
2022-12-19T21:39:33.7323760Z INFO - DeprecationWarning: 'uslugify' is deprecated. 'uslugify' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.
2022-12-19T21:39:33.7333417Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/markdown/extensions/toc.py", line 285, in run
2022-12-19T21:39:33.7334445Z el.attrib["id"] = unique(self.slugify(innertext, self.sep), used_ids)
2022-12-19T21:39:33.7335588Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/pymdownx/util.py", line 315, in _deprecated_func
2022-12-19T21:39:33.7336248Z warnings.warn(
2022-12-19T21:39:33.7336455Z
2022-12-19T21:39:33.7428904Z INFO - DeprecationWarning: 'uslugify' is deprecated. 'uslugify' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.
2022-12-19T21:39:33.7430916Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/markdown/extensions/toc.py", line 285, in run
2022-12-19T21:39:33.7431807Z el.attrib["id"] = unique(self.slugify(innertext, self.sep), used_ids)
2022-12-19T21:39:33.7433072Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/pymdownx/util.py", line 315, in _deprecated_func
2022-12-19T21:39:33.7433776Z warnings.warn(
2022-12-19T21:39:33.7434666Z
2022-12-19T21:39:33.7547516Z INFO - DeprecationWarning: 'uslugify' is deprecated. 'uslugify' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.
2022-12-19T21:39:33.7549071Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/markdown/extensions/toc.py", line 285, in run
2022-12-19T21:39:33.7549958Z el.attrib["id"] = unique(self.slugify(innertext, self.sep), used_ids)
2022-12-19T21:39:33.7551405Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/pymdownx/util.py", line 315, in _deprecated_func
2022-12-19T21:39:33.7573608Z warnings.warn(
2022-12-19T21:39:33.7593211Z
2022-12-19T21:39:33.7669290Z INFO - DeprecationWarning: 'uslugify' is deprecated. 'uslugify' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.
2022-12-19T21:39:33.7670691Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/markdown/extensions/toc.py", line 285, in run
2022-12-19T21:39:33.7671794Z el.attrib["id"] = unique(self.slugify(innertext, self.sep), used_ids)
2022-12-19T21:39:33.7675337Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/pymdownx/util.py", line 315, in _deprecated_func
2022-12-19T21:39:33.7676080Z warnings.warn(
2022-12-19T21:39:33.7676478Z
2022-12-19T21:39:33.7821353Z INFO - DeprecationWarning: 'uslugify' is deprecated. 'uslugify' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.
2022-12-19T21:39:33.7822823Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/markdown/extensions/toc.py", line 285, in run
2022-12-19T21:39:33.7835002Z el.attrib["id"] = unique(self.slugify(innertext, self.sep), used_ids)
2022-12-19T21:39:33.7836795Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/pymdownx/util.py", line 315, in _deprecated_func
2022-12-19T21:39:33.7837542Z warnings.warn(
2022-12-19T21:39:33.7838728Z
2022-12-19T21:39:33.8014139Z INFO - DeprecationWarning: 'uslugify' is deprecated. 'uslugify' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.
2022-12-19T21:39:33.8015562Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/markdown/extensions/toc.py", line 285, in run
2022-12-19T21:39:33.8016563Z el.attrib["id"] = unique(self.slugify(innertext, self.sep), used_ids)
2022-12-19T21:39:33.8018027Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/pymdownx/util.py", line 315, in _deprecated_func
2022-12-19T21:39:33.8018743Z warnings.warn(
2022-12-19T21:39:33.8019163Z
2022-12-19T21:39:33.8125417Z INFO - DeprecationWarning: 'uslugify' is deprecated. 'uslugify' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.
2022-12-19T21:39:33.8126879Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/markdown/extensions/toc.py", line 285, in run
2022-12-19T21:39:33.8128029Z el.attrib["id"] = unique(self.slugify(innertext, self.sep), used_ids)
2022-12-19T21:39:33.8129370Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/pymdownx/util.py", line 315, in _deprecated_func
2022-12-19T21:39:33.8130113Z warnings.warn(
2022-12-19T21:39:33.8130572Z
2022-12-19T21:39:33.8458085Z INFO - DeprecationWarning: 'uslugify' is deprecated. 'uslugify' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.
2022-12-19T21:39:33.8666386Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/markdown/extensions/toc.py", line 285, in run
2022-12-19T21:39:33.8738359Z el.attrib["id"] = unique(self.slugify(innertext, self.sep), used_ids)
2022-12-19T21:39:33.8739652Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/pymdownx/util.py", line 315, in _deprecated_func
2022-12-19T21:39:33.8740322Z warnings.warn(
2022-12-19T21:39:33.8740757Z
2022-12-19T21:39:33.8904739Z INFO - DeprecationWarning: 'uslugify' is deprecated. 'uslugify' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.
2022-12-19T21:39:33.8906049Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/markdown/extensions/toc.py", line 285, in run
2022-12-19T21:39:33.8906854Z el.attrib["id"] = unique(self.slugify(innertext, self.sep), used_ids)
2022-12-19T21:39:33.8908616Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/pymdownx/util.py", line 315, in _deprecated_func
2022-12-19T21:39:33.8909093Z warnings.warn(
2022-12-19T21:39:33.8909261Z
2022-12-19T21:39:33.9359932Z INFO - DeprecationWarning: 'uslugify' is deprecated. 'uslugify' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.
2022-12-19T21:39:33.9361299Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/markdown/extensions/toc.py", line 285, in run
2022-12-19T21:39:33.9362082Z el.attrib["id"] = unique(self.slugify(innertext, self.sep), used_ids)
2022-12-19T21:39:33.9363241Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/pymdownx/util.py", line 315, in _deprecated_func
2022-12-19T21:39:33.9363906Z warnings.warn(
2022-12-19T21:39:33.9364405Z
2022-12-19T21:39:33.9673569Z INFO - DeprecationWarning: 'uslugify' is deprecated. 'uslugify' is deprecated in favor of the configurable 'slugify' function. See documentation for more info.
2022-12-19T21:39:33.9675647Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/markdown/extensions/toc.py", line 285, in run
2022-12-19T21:39:33.9676895Z el.attrib["id"] = unique(self.slugify(innertext, self.sep), used_ids)
2022-12-19T21:39:33.9681029Z File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/pymdownx/util.py", line 315, in _deprecated_func
2022-12-19T21:39:33.9681959Z warnings.warn(
2022-12-19T21:39:33.9682465Z
@jrappen uslugify
is deprecated as it says. Now you can just use slugify
with the options to control the slug options. See here for configuring it in MkDocs YAML configs: https://facelessuser.github.io/pymdown-extensions/faq/#function-references-in-yaml.
I'm not sure if related to this beta or not (I'm running 9.0.0b4) but I've found when following the instructions at https://squidfunk.github.io/mkdocs-material/reference/data-tables/#sortable-tables and added the tablesort.js
code to docs/javacripts/tablesort.js
and the two lines to mkdocs.yml too. I can't see any errors in the logs, however it just doesn't seem to do anything (table still displays OK, just no sort icon as shown on the demo page)
I just tested Tablesort locally on the feature/material-v9
branch, and everything works as expected, i.e. the icons show up and I can sort tables. It's hard to know what went wrong in your specific use case without a reproducible example. I can look into it, if you provide such a minimal reproducible example and attach it here as a zip.
Thanks @squidfunk - I'm pleased to say it turns out that "me being an idiot" was actually the issue 😂 - I had lots of folders open and only just realised when going back in today that javascripts
was mistakenly set as a top-level directory rather than as a sub-directory 🤦♂️. Sorry for wasting your time, it now works perfectly 🥳
Thank you all for testing the beta! 9.0.0 will be released today.
@squidfunk isn't the hero we deserve, but the one we need. ❤️
@squidfunk, updated from 8.5.11 to 9.0.0 and this error appears. There are several .md pages in dir guide and it fails with such error. Only deletion of page that is out of index solves the issue. Also this appears with all 9+ versions
ERROR - Error building page 'guide/start.md': list index out of range
Traceback (most recent call last):
File "/usr/local/bin/mkdocs", line 8, in
IndexError: list index out of range
@HighLander Possibly related: #4824. If this is not the cause, please create a separate bug report.
With the help of our awesome sponsors, I'm happy to announce that the 'Carolina Reaper' funding goal has been reached, which means that the brand new search is finding its way into the community edition!
Since this is a pretty major change, we're releasing the new search as part of a new major version, so we can also drop and refactor some things that are overdue. This issue will track the progress on the road from the beta to the final release of v9.
If you experience any problems, for now, please report them as a comment in this issue.
Installation
Additions and improvements
--dirtyreload
Removals
:is
selectors (in output) to allow for easier overriding of CSS in daffd085f3bc35058ada32fad0a21b2d88ac0d3f.title
suffix on translations in 37250f1beFixes
kr
ko
) in 5aebaaa71tags:foo
ortitle:bar
)-foo
or-title:bar
)foo~1
ortitle:bar~2
)foo^2
ortitle:bar^4
)*foo
or*title:bar
)Upgrading
Changes to
mkdocs.yml
Enable copy-to-clipboard button: the copy-to-clipboard buttons are now opt-in. If you wish to enable them for all code blocks, add the following lines to
mkdocs.yml
:You can also choose to enable them for specific code blocks, by adding a
.copy
class to the code block, like so:Enable edit and view source button: a "view source" button can be shown next to the "edit this page" button, both of which must now be explicitly enabled. The
repo_url
must also be given. Add the following lines tomkdocs.yml
:Enable navigation footer: the previous and next buttons in the footer are now opt-in. If you wish to keep them for your documentation, add the following lines to
mkdocs.yml
:Use Korean language: the Korean language code was
kr
, which is not correct. It was corrected toko
:Use Norwegian languages: the Norwegian language code was
no
, was no renamed tonb
.Feedback widget URLs: the old, nameless placeholders were removed (after being deprecated for several months). If Make sure to switch to the new named placeholders
{title}
and{url}
:There should be no other changes to
mkdocs.yml
necessary. If you discover that you need to change other lines to make v9 work, please comment below, so we can add it to the list.Changes to documents
Alternate admonition qualifiers: to keep the size of the CSS down, we removed support for alternate admonition qualifiers. Please use the standard admonition qualifiers that are mentioned in our documentation.Changes to customizations
If you've customized Material for MkDocs with theme overrides, and added your own partials, you need to adjust for some changes, as the translations keys got updated. Keys that end with
.title
have been stripped off the suffix, sofooter.title
now becomesfooter
. The reason is that those are mostly generic translations of components that may not only be used intitle
attributes. See the partial diff.Closing thoughts
Version 9 is a pretty big release, which includes a completely rewritten search implementation. I'm super happy to finally give it into the hands of all users, so we can improve it even more. Before issuing the final release, I'll take the opportunity to refactor some edges that need a little polishing and incorporate your feedback.