-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🚀 Material for MkDocs 5.0.0 RC 4 #1498
Comments
@squidfunk will you publish an RC Docker image as well? |
@fkorotkov just pushed the Docker image, see OP. |
Hey, I'm having some issues with custom logos/icons. If I want to use my own PNG/SVG, where should I put it in? this is my mkdocs.yml: theme:
name: material
custom_dir: 'theme'
language: en
feature:
- instant
- tabs
palette:
primary: 'blue grey'
accent: 'red'
# font:
# text: 'Roboto'
# code: 'Ubuntu Mono'
icon:
logo: "assets/images/android-chrome-256x256.png"
favicon: "assets/images/safari-pinned-tab.svg" and in my directory looks like this:
but I still get error
Where is ".icons".? Thanks in advance. |
I followed your migration guide and it seems to work. Great work on the CSS Variables, took a bit of trial and error, but works fine. Need to fine-tune our CI colors now.
The icons specified for Please take a look at my migration at https://github.com/retest/docs/tree/feature/mkdocs-material-v5 I specified theme and put them under Edit: notice the |
Note that icons can only be used as SVGs, as they are inlined into the HTML.
Ah, yes! So custom icons can be specified when using theme extension - I haven#t thought of that. We should document that! |
So there's And there's Is that correct? IMHO, that's a bit confusing ... |
The idea was no unify icon configuration, so that maybe later we can add more icons to the
|
Maybe:
|
|
Fixes #490 Related to squidfunk/mkdocs-material#1498
And everything in the If yes, I don't know – but the difference between |
I agree that there is an inconsistency between But I do not know the code behind that and if the svg locking was done for a reason (e.g. to inline the svgs directly into the html) because otherwise it would have been to complicated or would have resulted in ugly code (e.g. exist check of file, etc).
As to update the documentation, it would be helpful to update the documentation and to make it more clear to what I did. Because what I did—in retrospect—seems quite simple, but if you do not have an idea on what I did, it seems complicated. To elaborate: My solution (I did not check this) works only, because I have an overwritten theme defined. |
Different topic: In the OP, you mention:
Could you elaborate on that, maybe with an example on how to add custom keyboard shortcuts? And maybe also add that to the docs? |
The point is that |
I assume you added the „made with ❤️...“ yourself, so yeah it doubles in your case but normally there’s only the copyright notice and the theme notice. I’m open to suggestions regarding the wording, but I want to get rid of „powered by“ as that is the wrong message after thinking about it again. And „built with“ is too technical. |
... also the theme provides much more than just the design. The whole UX. |
What are you telling me with this? @squidfunk What about the other question? Can this be altered using the |
You were looking for an example of an override, no? |
Ah, my bad |
@Andre601 of course you can adjust it using theme extension – just bring your own |
Alright. I'll need to look into what I have to actually alter, to not mess stuff up... Sure will be fun... I-I hope |
@Andre601 https://squidfunk.github.io/mkdocs-material/customization/#extending-the-theme - the docs describe exactly the overriding of the footer 😉 |
@Andre601 Think you meant |
|
@facelessuser For the Will v7 automatically handle that for the new UML library?
Mermaid looks absolutely beautiful btw 😄 |
@ofek v7 of pymdownx doesn't provide any JS automatically. It didn't automatically provide JS for the old UML either. UML examples are exactly that, examples of how SuperFences can be expanded. With that said, what I have I believe works with instant (last I checked as I don't currently run instant). I added the "switch" event in my own "extra JS": https://github.com/facelessuser/pymdown-extensions/blob/master/docs/src/js/extra.js#L7. I don't have a solution yet for MathJax loading in the traditional way, but as I only need it on one page, I currently include it at the end of my Arithmatex page, and it seems to work fine. As I'm not running instant by default, I haven't looked into getting it working in the more traditional way that people would normally load it.
Thanks! I really wanted it to kind of go with the overall theme I had going on in the docs, I think it turned out pretty good 🙂. Mermaid, annoyingly, no longer release CSS, and instead opt to inline the CSS in the exported SVG. So, I include the source in the build process, import their SCSS, and build my own with my own colors and some style overrides. Then we configure Mermaid to not load an inline CSS, and then include our own 😉 . I think Mermaid provides way more, and seems quite active. The old Sequence Diagram that I used to use works, but I think is pretty much dead, and the latest isn't really compatible with the latest Flowchart.js. Anyways, I find Mermaid more powerful despite its quirks here and there, and I've seen a number of people preferred it over the old suggestions, so I thought I'd run with it. |
By the way, I use a custom loader for Mermaid to overcome some issues with loading diagrams from hidden tabs and details elements. I mention that in the docs as well. |
In v4, if you started searching before In v5, if you start searching before the index is loaded, the search displays "No matching results" and keeps displaying that message even after the index has been loaded. For example, if you type "test" and wait until the search index is loaded, Material keeps displaying "No matching results" until you press a key. You must change the search term to, e.g., "tes" and then back to "test" to get your search results. Steps to reproduce:
|
@wilhelmer could you open an issue? I don’t consider it blocking for the release tomorrow but we should definitely fix it. |
Yep, will do. And agree, please don't block the release, as this will only affect projects with large search indexes (like ours). |
It’s actually related to the issue that proposes the introduction of a loader during index time, #1439. |
Should I add a comment there or would you rather keep it as two separate issues? |
I‘d say the open issue is sufficient, so add a comment there regarding the behavior you described. |
It's done! 🎉🎉🎉 Material for MkDocs 5 is out! A big THANK YOU to all of you guys testing, reporting bugs, improving it! Without your extensive testing, we wouldn't have such a stable release! |
Thank you!!! |
Congrats on v5!
Thanks for the help. This solution works very well. // Re-render MathJax on document switch (instant loading, custom event)
document.addEventListener("DOMContentSwitch", function() {
MathJax.typesetPromise();
}); |
Help test Material 5 RC 4! Deploy preview
Please post any problems you encounter during migration in this issue.
Installation
Using
pip
:Using
docker
:Features
__material.dialog$.next("Hi!")
in the console!Fixed in RC 2
pymdownx.inline
andinline
Fixed in RC 3
Fixed in RC 4
popstate
event triggeredhistory.pushState
againrequired
attribute on search inputMigration
See the migration guide in the deploy preview.
The text was updated successfully, but these errors were encountered: