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

[Bug] KeyError: 'Slug' #31

Open
Kristinita opened this issue Feb 13, 2017 · 0 comments
Open

[Bug] KeyError: 'Slug' #31

Kristinita opened this issue Feb 13, 2017 · 0 comments

Comments

@Kristinita
Copy link

Kristinita commented Feb 13, 2017

1. Summary

If users set [**SLUGIFY_SOURCE = 'basename'**](http://docs.getpelican.com/en/stable/settings.html?highlight=slugify_source#basic-settings) in pelicanconf.py, Slug is not mandatory parameter.

2. Expected behavior

Not stack trace in console.

3. Actual behavior

command: pelican_insert_metadata
Traceback (most recent call last):
  File "D:\Sublime Text 3 x64\sublime_plugin.py", line 818, in run_
    return self.run(edit)
  File "Pelican in D:\Sublime Text 3 x64\Data\Installed Packages\Pelican.sublime-package", line 187, in run
KeyError: 'Slug'

4. Settings

Example of User/Pelican.sublime-settings file, I remove Slug parameter:

{
    "article_metadata_template": {
    // Metadata template for Markdown articles
    "md":
      [
        "Title: ",
        "Template: ",
        "Date: %(date)s",
        "Modified: %(modified)s",
        "Author: %(author)s",
        "Lang: %(lang)s",
        "JQuery: true",
        "DetailsPolyfill: false"
      ]
      }
}

5. Steps to reproduce

The problem is reproduced for me in a version of Sublime Text without plugins and user settings.

I open any md file → Ctrl+Shift+PPelican: Insert Metadata → I get actual behavior.

6. Environment

Operating system and version:
Windows 10 Enterprise LTSB 64-bit EN
Sublime Text:
Build 3126

Thanks.

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

1 participant