liang2kl / mkdocs-blogging-plugin

Add blogging feature to your MkDocs site.
https://liang2kl.github.io/mkdocs-blogging-plugin
MIT License
84 stars 17 forks source link

[BUG] Custom button label #27

Closed LorhanSohaky closed 2 years ago

LorhanSohaky commented 2 years ago

Describe the bug Not uses my button label

To Reproduce Steps to reproduce the behavior:

  1. Edit mkdocs.yml with:

    plugins:
    - awesome-pages
    - search
    - blogging:
      dirs:
        - blog
    
      locale: pt
      time_format: '%d/%m/%y %H:%M:%S'
      meta_time_format: '%Y-%m-%d %H:%M:%S'
      theme:
        name: button
        options:
          - plain_button: true
          - label: 'Test'
      features:
        tags:
          index_page: tags.md
          insert: top
  2. Creates a blog post blog/test.md:
    
    ---
    title: Loren
    description: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    # Additional metadata can be used in the template
    author: User
    tags:
    - test
    ---

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

4. Creates `index.md`
```md
---
title: Home
hide:
  - navigation
---

# My posts

{{ blog_content }}
  1. See error

Expected behavior Button with label Test

Screenshots image

Environment (please complete the following information):

liang2kl commented 2 years ago

Sorry, this is misdocumented. The theme option should be a dictionary (object):

theme:
  name: button
  options:
    plain_button: true
    label: 'Test'

You should remove the - before plain_button and label.