-
Notifications
You must be signed in to change notification settings - Fork 17
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
[FEATURE] Per-directory settings. #17
Comments
I have considered this before, but for some reason I might not be able to implement this at this moment (maybe some time later I will look into this).
Actually I have found the plugin limited myself, because MkDocs does not provide the exact APIs needed to build a blogging plugin. Thus, some current implementation is ugly, and the addition of features is hard to achieve. Because of that, I switched to Hugo a few weeks ago (and abandoned my own plugin, but I will keep maintaining). You can try out some dedicated blog site generators if you need advanced blogging features. |
I see... Sad to hear about this unfortunate status, but I guess it happens. One idea could perhaps be to use frontmatter to override settings on a per-page level. |
I managed to implement a version based on your idea. It's currently on the branch The new docs: https://github.com/liang2kl/mkdocs-blogging-plugin/blob/feat/categories/docs/index.md. In short, you can setup categories in this way: plugins:
- blogging:
# --- GLOBAL-CATEGORY: configs for {{ blog_content }} ---
dirs:
- blog
template: override/custom-blog.html
# --- END GLOBAL CATEGORY ---
# --- INDIVIDUAL CATEGORIES: configs for {{ blog_content name }} ---
categories:
- name: reviews
dirs:
- reviews
# --- END INDIVIDUAL CATEGORIES ---
# Other globally applied options
... To install:
I will appreciated it if you would help testing this ^_^ |
Now it's available as version 2.0.0 |
Hey. Sorry for not replying but not only was GitHub for some reason not sending me an e-mail about the notif, but I also was a bit busy recently... I tried out
Plugin Configuration as of right now: - blogging:
dirs:
- posts/2020
- posts/2021
features:
tags:
index_page: 'posts/tags.md'
insert: top
template: 'theme/blog/blog-override.html'
theme:
name: card
locale: de
size: 5
time_format: '%d.%m.%Y'
meta_time_format: '%d.%m.%Y' |
Thank you for the feedback. |
Version 2.0.1 should be able to run under python3.7 now. |
Thanks, that fixed it. I would've liked to try and use Python 3.9, but for whatever reason is Netlify only supporting 3.7 as newest version :/ |
Idea
It would be cool if the blogging plugin would allow defining certain settings on a per-directory level such as a category (More on that in a bit).
It would allow a much higher amount of customization that the plugin is already offering.
Categories
I mentioned categories. By that I mean a way to "group" certain blog directories together to then display.
Some bloggers may have different categories/blogs for different purposes.
As an example could I have a
posts
category for casual blog posts and areviews
category where I only have reviews.Example configuration:
You would then be able to use the category name in the
{{ blog_content }}
placeholder to only list pages from the dirs of that group.Example:
{{ blog_content reviews }}
Other options
If this setup would be implemented would it be cool if the options of it could be included for those directories too.
Example:
How is that useful
It would allow us to have high control of how and where we would serve specific content (blog posts) without the trouble of having to stick with one single blog section.
I'm aware that this is a huge task, if not even impossible with how the plugin may be structured right now and I feel sorry that I can't contribute any code to it to help with. But I hope it's doable and that it is considered.
The text was updated successfully, but these errors were encountered: