3 ms·
Love Yeoman. For the love of god, how do I create 'pretty permalink' (Jekyll Style) with it - "about.html" to create "/about/index.html"?
by Brajeshwar 13y ago
Love Yeoman. For the love of god, how do I create 'pretty permalink' (Jekyll Style) with it - "about.html" to create "/about/index.html"?
- jenius 13y agoNginx - just remap the urls. We run http://carrot.is http://carrot.is (not meant to be a plug, just an example) served statically via nginx and the urls are "pretty". You can use a little statement like this in your nginx config: if ( $uri !~ /index\.html$) { rewrite ^(/.+)\.html$ $scheme://$host$1 permanent; }
- sethammons 13y agoOfftopic - your username reminds me of a line from the Beverly HillBillies that went something like: "Hi, I'm Jethro Bodine; initials JB. Turn it around, BJ -- Boy Jenius." Ha ha.
- CognitiveLens 13y ago+1 to jenius for a server-side solution but in addition: Yeoman helps manage and coordinate various build tools, but for pretty permalinks on your production build, you're probably going to need something like a plugin for `grunt build` that renames files as they're copied into your /dist directory.
- deleted 13y ago[deleted]
- thealphanerd 13y agoFor development we use grunt-connect-rewrite. It is a middleware for connect (which yeoman uses) that allows you to write custom rules similarly to how you would implement them in Apache. You can see our connect setup in this gist https://gist.github.com/TheAlphaNerd/6322927 https://gist.github.com/TheAlphaNerd/6322927