Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uiolee/hexo-absolute
convert relative path to absolute URL for hexo
https://github.com/uiolee/hexo-absolute
filter hexo hexo-plugin plugin url
Last synced: about 1 month ago
JSON representation
convert relative path to absolute URL for hexo
- Host: GitHub
- URL: https://github.com/uiolee/hexo-absolute
- Owner: uiolee
- License: mpl-2.0
- Created: 2022-06-05T02:40:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-18T03:36:25.000Z (6 months ago)
- Last Synced: 2024-09-19T02:44:35.578Z (about 2 months ago)
- Topics: filter, hexo, hexo-plugin, plugin, url
- Language: JavaScript
- Homepage: https://npmjs.com/hexo-absolute
- Size: 239 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hexo-absolute
[![GitHub Tag](https://img.shields.io/github/v/tag/uiolee/hexo-absolute?logo=github)](https://github.com/uiolee/hexo-absolute/tags)
[![GitHub Release](https://img.shields.io/github/v/release/uiolee/hexo-absolute?logo=github)](https://github.com/uiolee/hexo-absolute/releases)
[![GitHub commits since latest release](https://img.shields.io/github/commits-since/uiolee/hexo-absolute/latest?include_prereleases&sort=semver&logo=github)](https://github.com/uiolee/hexo-absolute/compare/...main)
[![GitHub top language](https://img.shields.io/github/languages/top/uiolee/hexo-absolute?logo=github)](#hexo-absolute)
[![Coverage Status](https://coveralls.io/repos/github/uiolee/hexo-absolute/badge.svg?branch=main)](https://coveralls.io/github/uiolee/hexo-absolute?branch=main)
[![CI](https://github.com/uiolee/hexo-absolute/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/uiolee/hexo-absolute/actions/workflows/ci.yml)
[![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/uiolee/hexo-absolute?logo=librariesdotio)](https://libraries.io/github/uiolee/hexo-absolute#dependencies)Convert relative path to absolute URL for [hexo](https://github.com/hexojs/hexo)
Only run when `hexo generate` or `deploy`, won't run when `hexo server`.
## Install
[![NPM Version](https://img.shields.io/npm/v/hexo-absolute?logo=npm)](https://www.npmjs.com/package/hexo-absolute)
[![node-lts](https://img.shields.io/node/v-lts/hexo-absolute?logo=nodedotjs)](https://nodejs.org/)
[![NPM License](https://img.shields.io/npm/l/hexo-absolute)](./LICENSE)
[![NPM Downloads](https://img.shields.io/npm/dm/hexo-absolute?logo=npm)](#hexo-absolute)
[![NPM Downloads](https://img.shields.io/npm/dt/hexo-absolute?logo=npm)](#hexo-absolute)
[![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/npm/hexo-absolute?logo=librariesdotio)](https://libraries.io/npm/hexo-absolute/tree)```bash
pnpm add hexo-absolute# npm i hexo-absolute
```## Configuration
### Website Configuration
```yaml
# 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**](https://hexo.io/docs/configuration#URL)
### Plugin Configuration
```yaml
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.
> [**Hexo/API/Filter#Synopsis:**
> You can define the priority. Lower priority means that it will be executed first. The default priority is 10.](https://hexo.io/api/filter.html#Synopsis)## Example (default config)
### before
```html
top```
### after
```html
top```
## Uninstall
```bash
pnpm rm hexo-absolute# npm uninstall hexo-absolute
```