hexo-simplify-url

1.0.0 • Public • Published

hexo-simplify-url

NPM Version NPM Downloads LICENSE

Simplify url for pages and links.
You could use this module for your SEO of blog powered by hexo.

If you don't want to see /index.html in your urls, use simplify_url helper.

If you don't want your users see /index.html or /index in the address bar of browsers, use simplify_url_auto_redirect helper.

Installation

npm install --save hexo-simplify-url

Usage

simplify_url

Use simplify_url to remove index.html in the links.

<%= simplify_url(page.permalink) %>
 
<%- simplify_url(open_graph({ ... })) %>

Notice: From hexo@4.0, use pretty_urls option can remove index.html from permalink. (https://github.com/hexojs/hexo/pull/3691)

simplify_url_auto_redirect

Add a simplify_url_auto_redirect helper simply to your html's <head> block as follows:

<%- simplify_url_auto_redirect() %>

License

Copyright (c) 2019 dailyrandomphoto. Licensed under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i hexo-simplify-url

Weekly Downloads

14

Version

1.0.0

License

MIT

Unpacked Size

4.15 kB

Total Files

4

Last publish

Collaborators

  • dailyrandomphoto