3.0.0 • Published 5 months ago

hexo-absolute v3.0.0

Weekly downloads
-
License
MPL-2.0
Repository
github
Last release
5 months ago

hexo-absolute

Convert relative path to absolute URL for hexo

Install

NPM Version node-lts NPM License NPM Downloads NPM Downloads Libraries.io dependency status for latest release

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

Hexo/Docs/Configuration#URL

Plugin Configuration

absolute:
  enable: true
  tagName: ["a", "link", "img", "script"]
  attribute: ["href", "src"]
  priority: 20

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
3.0.0

5 months ago

2.0.0-test.0

9 months ago

2.0.0

9 months ago

1.0.2

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.1.0

2 years ago

0.2.0

2 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago