Skip to content

Commit

Permalink
Initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
clxering committed Jul 23, 2023
0 parents commit 5a6ee2f
Show file tree
Hide file tree
Showing 13 changed files with 5,653 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# VS Code
.vscode/

# dependencies
/node_modules

# testing
/coverage
**/test/**
!**/test/uuidlink.test.js

# production
*.LICENSE.txt

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
9 changes: 9 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) 2023 clxering (https://github.com/clxering)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# hexo-uuidlink

The plugin can generate permalink for articles based on UUID.

## Usage

Currently, the plugin can handle all **published articles** (Excluding drafts). Here are the specific usage instructions:

**1. Install**

Execute this command in the root directory of your blog’s source code.

``` bash
$ npm install hexo-uuidlink --save
```

**2. Clean**

Execute the cleaning process.

``` bash
$ hexo clean
```

**3. Regenerate**

Regenerate the articles.

``` bash
$ hexo g
```

After executing the above command, the `uuidlink` parameter will be added to the header of all articles.

```bash
---
title: Hello World
date: 2022-12-26 16:19:29
categories:
- backend
tags:
- git
- java
uuidlink: e179a7bb-197c-4b37-9b8d-f1fda7c17b20
---
```

**4. Modify the `_config.yml`**

Find the `permalink` item in `_config.yml` and modify its value to `:uuidlink/` or any other format that includes that field. Then you execute `hexo s` to start the service.

```bash
# URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: http://example.com
permalink: :uuidlink/
permalink_defaults:
pretty_urls:
trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
trailing_html: true # Set to false to remove trailing '.html' from permalinks
```

## License

hexo-uuidlink is [MIT license](https://spdx.org/licenses/MIT).

## Changelog

### [0.0.1](https://github.com/inspiration-lab/hexo-uuidlink/compare/v0.0.1...v0.0.1) (2023-07-23)

- Initial release
1 change: 1 addition & 0 deletions lib/uuidlink.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5a6ee2f

Please sign in to comment.