Skip to content
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

Default configurations does not seem to be included #36

Closed
mazzespazze opened this issue Oct 19, 2022 · 2 comments
Closed

Default configurations does not seem to be included #36

mazzespazze opened this issue Oct 19, 2022 · 2 comments

Comments

@mazzespazze
Copy link

Describe the bug
Not really a bug, but I get immediately warnings as
WARNING - Config value: 'features'. Warning: Unrecognised configuration name: features

To Reproduce
If one clones the repository, and runs mkdocs serve the warning will pop up.

Here my mkdocs.yml

site_name: Mkdocs Blogging Plugin
site_url: https://liang2kl.github.io/mkdocs-blogging-plugin/
repo_url: https://github.com/liang2kl/mkdocs-blogging-plugin/
repo_name: liang2kl/mkdocs-blogging-plugin
edit_uri: ""

theme:
  name: "material"

markdown_extensions:
  - admonition
  - pymdownx.highlight
  - pymdownx.superfences
  - toc:
      permalink: true

features:
  tags:
    {}
    #insert: top

nav:
  - index.md
  #- Features: features.md
  #- Theme: theme.md
  #- Template: template.md
  #- Migration Guide: migration.md

time_format: "%Y-%m-%d %H:%M:%S" # The format used to display the time
locale: en
plugins:
  - awesome-pages
  - search
  - blogging:
      dirs:
        - blog
      theme:
        name: button
        options: # Optional
          # `true` if display the button as plain text
          # `false` or not present if display as rectangle button
          plain_button: true
          # Replacement for 'Continue Reading'
          label: Read

copyright: Copyright © 2021 Matteo Ghetti

Expected behavior
To not have any warning on default configurations.

Screenshots
Screenshot from 2022-10-19 18-13-02

Environment (please complete the following information):

  • Ubuntu 20, 64x arch
  • Python 3.9
  • mkdocs 1.3.1

Additional context
I just wanna run the default example with features, time_stamp and locale enabled.

@mazzespazze mazzespazze changed the title Default confid not included Default configurations does not seem to be included Oct 19, 2022
@liang2kl
Copy link
Owner

liang2kl commented Oct 20, 2022

As the docs suggested,

Aside from the category settings, there are some globally applied options, which should be defined at the top level of the plugin configuration

these configurations should be placed under plugins - blogging. For example:

plugins:
  - blogging:
      dirs:
        - blog
      time_format: '%d/%m/%y %H:%M:%S'
      meta_time_format: '%Y-%m-%d %H:%M:%S'
      features:
        tags:
          index_page: tags.md
          insert: top

@mazzespazze
Copy link
Author

That was it, thanks! I did not understand it was inside blogging plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants