Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Flyounet
Copy link

This PR include the previous one *DraftDir + manage accent for slug() *.

The feature added is to have a direct link to the post (with draft: false) which is created just before, and same thing for the one created just after.

In case no post available before, or after the link goes to index.

Previously the slug function didn't handled accent :
echo 'Baker est très bien' | tr -cs '[:alnum:]\n' - | tr '[:upper:]' '[:lower:]' | sed 's|^-*||;s|-*$||'
baker-est-tr-s-bien

Now it handles them :
echo 'Baker est très bien' | iconv -f utf8 -t ascii//TRANSLIT | tr -cs '[:alnum:]\n' - | tr '[:upper:]' '[:lower:]' | sed 's|^-*||;s|-*$||'
baker-est-tres-bien
The idea is when you're on a Post, you can go to the older or the newer.
If the there is no newer or no older, you go to the index.
 pour expliquer en quoi cette fusion est
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

Successfully merging this pull request may close these issues.

1 participant