hexo-absolute
v2.0.0
Published
convert relative path to absolute URL for hexo
Downloads
12
Readme
hexo-absolute
Convert relative path to absolute URL for hexo
Only run when hexo generate
or deploy
, won't run when hexo server
.
Install
pnpm add hexo-absolute
# npm i hexo-absolute
Configuration
Website Configuration
# If your website is in a subdirectory (such as http://example.org/blog) set url to http://example.org/blog and set root to /blog/.
url: http://example.org/blog
Plugin Configuration
absolute:
enable: true
tagName: ["a", "link", "img", "script"]
attribute: ["href", "src"]
priority: 20
enable
boolean, set
false
to disable this plugin.tagName
html tag name
attribute
html tag attribute
priority
define the priority of this plugin.
Example (default config)
before
<a href="#top">top</a>
<link rel="stylesheet" href="/css/style.css" />
<img src="/images/hexo.png" />
<script src="/js/jquery-2.2.4.min.js"></script>
after
<a href="https://example.org/#top">top</a>
<link rel="stylesheet" href="https://example.org/css/style.css" />
<img src="https://example.org/images/hexo.png" />
<script src="https://example.org/js/jquery-2.2.4.min.js"></script>
Uninstall
pnpm rm hexo-absolute
# npm uninstall hexo-absolute