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

Replaced the default slug-fn with a more robust version. #236

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on May 23, 2019

  1. Replaced the default slug-fn with a more robust version.

    The previous default slug-fn used by the slug task assumed
    Jekyll-style naming, e.g., "2001-01-01-my-post.md", and if this
    assumption was violated it would return non-sensical results.
    
    Previous slug-fn:
    
    | Source filename         | Slug                | Final filename           |
    |-------------------------|---------------------|--------------------------|
    | "2001-01-01-my-post.md" | "my-post"           | "my-post.html"           |
    | "index.md"              | ""                  | ".html"                  |
    | "my-great-new-post.md"  | "post"              | "post.html"              |
    
    The new default slug-fn handles Jekyll-compliant names in the same
    way, but if given a filename that doesn't fit the Jekyll format it
    will just strip the extension.
    
    New slug-fn:
    
    | Source filename         | Slug                | Final filename           |
    |-------------------------|---------------------|--------------------------|
    | "2001-01-01-my-post.md" | "my-post"           | "my-post.html"           |
    | "index.md"              | "index"             | "index.html"             |
    | "my-great-new-post.md"  | "my-great-new-post" | "my-great-new-post.html" |
    wiseman committed May 23, 2019
    Configuration menu
    Copy the full SHA
    0cfd905 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2021

  1. Configuration menu
    Copy the full SHA
    b6a9192 View commit details
    Browse the repository at this point in the history