-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Migration from Hugo to Mkdocs Material is ready #6781
Replies: 1 comment · 10 replies
-
Yeah, I plan to migrate from Hugo also. Huge claim itself the fastest static web generator. But I found the learning curve is deep. Python for sure would be slower than go-native executable, but I suppose MKdocs Material's feature of sub projects would mitigate it well. |
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
The question is do you need the fastest? How big will be your documentation and how often will it be updated? To decrease rebuild times when using I did a simple performance benchmark with the Community version of Benchmark (sorted by time)
INFO - Documentation built in 9.22 seconds
BUILD_STAGE_TIMES =
[('build_pages', 4.90557),
('populate_pages', 3.82674),
('build_theme_templates', 0.16944),
('get_files', 0.10926),
('copy_static_files', 0.09138),
('on_config', 0.01901),
('on_nav', 0.01503),
('on_files', 0.01334),
('on_post_build', 0.00443),
('get_navigation', 0.00418),
('on_pre_build', 4e-05),
('on_env', 2e-05),
('build_extra_templates', 0.0)]
ALL_EVENT_TIMES =
[('post_page', 2.81611),
('page_context', 1.51964),
('page_markdown', 0.06419),
('config', 0.01901),
('post_template', 0.01622),
('page_content', 0.01554),
('nav', 0.01502),
('files', 0.01334),
('post_build', 0.00442),
('shutdown', 0.00144),
('pre_page', 4e-05),
('page_read_source', 4e-05),
('pre_build', 3e-05),
('env', 2e-05),
('pre_template', 0.0),
('template_context', 0.0)]
PLUGIN_TIMES =
[('mkdocs_minify_plugin/plugin.py', 2.83047),
('search/plugin.py', 0.92443),
('blog/plugin.py', 0.66887),
('hooks/shortcodes.py', 0.02797),
('hooks/translations.py', 0.0215)]
PLUGIN_EVENT_TIMES =
[('post_page--mkdocs_minify_plugin/plugin.py', 2.81431),
('page_context--search/plugin.py', 0.90238),
('page_context--blog/plugin.py', 0.61359),
('page_markdown--hooks/shortcodes.py', 0.02797),
('page_markdown--hooks/translations.py', 0.0215),
('config--search/plugin.py', 0.01767),
('post_template--mkdocs_minify_plugin/plugin.py', 0.01616),
('nav--blog/plugin.py', 0.015),
('page_content--blog/plugin.py', 0.01356),
('files--blog/plugin.py', 0.01331),
('page_markdown--blog/plugin.py', 0.0107),
('post_build--search/plugin.py', 0.00437),
('shutdown--blog/plugin.py', 0.00142),
('config--blog/plugin.py', 0.00128),
('pre_build--mkdocs_minify_plugin/plugin.py', 0.0),
('env--blog/plugin.py', 0.0),
('post_build--mkdocs_minify_plugin/plugin.py', 0.0)]
sum(BUILD_STAGE_TIMES) = 9.15844
sum(ALL_EVENT_TIMES) = 4.48506
From the benchmark we can see that most of the time is spent populating the pages, which is the step that processes the Markdown with the
This could be a dangerous flow of logic. Topics like power consumption and CO2 emission get more and more attention nowadays. Considering that everything goes into cloud computing and AI it's worth thinking about such stuff. However, I just comment about it, I'm not an eco-activist, mind you. I like my O(NN) solutions the best, because I can understand them the most, but I know they're not fit for production on scale.
If by "zooming" you mean a pop-out window that will put focus on the clicked image, then there is https://blueswen.github.io/mkdocs-glightbox/#demo |
Beta Was this translation helpful? Give feedback.
All reactions
-
I had a look at Regarding the performance question, I have already stated that I don't care. When I commit a change to my repository, the build pipeline works its magic. I use MkDocs Material because of the quality of the end result, regardless of whether it is built in a blazing fast 3 seconds or a more sluggish 5 minutes. |
Beta Was this translation helpful? Give feedback.
All reactions
-
@kamilkrzyskow how did you generate the timing data? Very interested in that one. I've done some CPU profiling in Python and found that quite useful, where I also discovered that rendering of navigation takes a very large fraction of time in larger sites, but this looks very handy for a quick test what causes a build to be slow. |
Beta Was this translation helpful? Give feedback.
All reactions
-
@squidfunk The benchmark is from a hacky monkey patch hook, which I'm slowly extending for personal use as I need it, and I started using it quite recently. Actually the nice prints and sorted by time results got added for this presentation 😺
|
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1
-
Thanks for sharing! It'll be of great use for me |
Beta Was this translation helpful? Give feedback.
-
Initially, I had my website created with Hugo, using the Blist theme. At first, I thought it was nice because of all the visuals, but later on, I began to dislike it. I was looking for a more professional look and feel. When I found mkdocs-material, I was immediately enthusiastic. It had a professional appearance and offered a lot of plugins to customize the site.
Compare the websites:
Before:
After:
Beta Was this translation helpful? Give feedback.
All reactions