-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
tab_width = 2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.eslintrc.js | ||
build |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
module.exports = { | ||
extends: ["plugin:prettier/recommended"], | ||
plugins: [ | ||
"simple-import-sort", | ||
"@typescript-eslint", | ||
"import", | ||
"prettier", | ||
"header", | ||
], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
project: "./tsconfig.json", | ||
}, | ||
rules: { | ||
"simple-import-sort/imports": "error", | ||
"simple-import-sort/exports": "error", | ||
"react/jsx-uses-react": "off", | ||
"react/react-in-jsx-scope": "off", | ||
"prettier/prettier": "error", | ||
"import/first": "off", | ||
"header/header": [ | ||
2, | ||
"block", | ||
[ | ||
"************************************************", | ||
" * Copyright (c) 2023.", | ||
" * Author: Cyrusky <[email protected]>", | ||
" ************************************************", | ||
], | ||
], | ||
"@typescript-eslint/no-useless-constructor": "off", | ||
}, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | ||
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages | ||
|
||
name: Publish Node.js Package | ||
|
||
on: | ||
release: | ||
types: [ created ] | ||
|
||
jobs: | ||
publish-npm: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm ci | ||
- run: npm build | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules | ||
node_modules | ||
dist/index.js |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
types: [ | ||
{ type: "feat", section: "Features" }, | ||
{ type: "fix", section: "Bugs Fix" }, | ||
{ type: "chore", hidden: true }, | ||
{ type: "docs", hidden: true }, | ||
{ type: "style", hidden: true }, | ||
{ type: "refactor", section: "Refactor" }, | ||
{ type: "perf", hidden: true }, | ||
{ type: "test", hidden: true }, | ||
], | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. | ||
|
||
### 0.1.5 (2024-02-22) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Cyrusky | ||
|
||
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 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. | ||
MIT License | ||
Copyright (c) 2022 Cyrusky | ||
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 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. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
# Hexo-Backlink | ||
|
||
A plugin to convert backlink in `.md` file to `in-site` link. | ||
|
||
## Install | ||
|
||
```bash | ||
npm install hexo-backlink | ||
``` | ||
|
||
## configuration | ||
|
||
Add `backlink:true` in `_config.yml`: | ||
|
||
Check the settings in Obsidian as follow: | ||
|
||
> "Settings" -> "Files & Links" -> "New link format" , setting as "Relative path to file" | ||
> "Settings" -> "Files & Links" -> "Use [[Wikilinks]]" , keeping it ON | ||
## Know-issue | ||
|
||
- Can not convert link include `tags`, it will ignore the tags. like: | ||
|
||
``` | ||
[[DemoMarkdownFile#Demo]] --<result equals>-> [[DemoMarkdownFile]] | ||
``` | ||
|
||
## TODO | ||
|
||
- [] Update the documents and make sure you can start from zero. | ||
- [] Change the project to typescript. | ||
- [] Try to do some integritions. | ||
# Hexo-Backlink | ||
|
||
A plugin to convert backlink in `.md` file to `in-site` link. | ||
|
||
## Install | ||
|
||
```bash | ||
npm install hexo-backlink | ||
``` | ||
|
||
## configuration | ||
|
||
Add `backlink:true` in `_config.yml`: | ||
|
||
Check the settings in Obsidian as follow: | ||
|
||
> "Settings" -> "Files & Links" -> "New link format" , setting as "Relative path to file" | ||
> "Settings" -> "Files & Links" -> "Use [[Wiki links]]" , keeping it ON | ||
## Know-issue | ||
|
||
- Can not convert link include `tags`, it will ignore the tags. like: | ||
|
||
``` | ||
[[DemoMarkdownFile#Demo]] --<result equals>-> [[DemoMarkdownFile]] | ||
``` | ||
|
||
## TODO | ||
|
||
- [] Update the documents and make sure you can start from zero. | ||
- [] Change the project to typescript. | ||
- [] Try to do some integritions. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const { resolve } = require("path"); | ||
const { build } = require("esbuild"); | ||
|
||
const rootDir = resolve(__dirname, ".."); | ||
|
||
build({ | ||
entryPoints: [resolve(rootDir, "src/index.ts")], | ||
bundle: true, | ||
minify: true, | ||
format: "cjs", | ||
platform: "node", | ||
target: "es2018", | ||
treeShaking: true, | ||
outfile: resolve(rootDir, "dist", "index.js"), | ||
}).then(() => { | ||
console.log("Build complete!"); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"ignore": [ | ||
"**/*.test.ts", | ||
"**/*.spec.ts", | ||
".git", | ||
"node_modules" | ||
], | ||
"watch": [ | ||
"src" | ||
], | ||
"exec": "pnpm build", | ||
"ext": "ts, *" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,55 @@ | ||
{ | ||
"name": "hexo-backlink", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "This plugin is for transfer Obsidian-type backlink to standard hexo in-site post link.", | ||
"main": "index.js", | ||
"scripts": {}, | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"build": "node build/index.js", | ||
"dev": "cross-env NODE_ENV=development nodemon", | ||
"release": "standard-version" | ||
}, | ||
"keywords": [ | ||
"hexo", | ||
"plugin", | ||
"backlink", | ||
"obsidian" | ||
], | ||
"files": [ | ||
"index.js" | ||
], | ||
"author": "BorGor", | ||
"license": "MIT", | ||
"dependencies": { | ||
"hexo-log": "^3.0.0", | ||
"@types/hexo": "^3.8.12", | ||
"husky": "^7.0.4", | ||
"jira-smart-commit": "^1.1.2" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Cyrusky/hexo-backlink.git" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"commit-msg": "jira-smart-commit PSN", | ||
"pre-commit": "lint-staged" | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/git-cz" | ||
} | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.11.19", | ||
"cross-env": "^7.0.3", | ||
"esbuild": "^0.20.1", | ||
"eslint": "^8.56.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-config-standard-with-typescript": "^43.0.0", | ||
"eslint-plugin-header": "^3.1.1", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"eslint-plugin-simple-import-sort": "^10.0.0", | ||
"git-cz": "^4.9.0", | ||
"hexo-fs": "^4.1.1", | ||
"hexo-log": "^3.2.0", | ||
"nodemon": "^3.0.2", | ||
"prettier": "^3.2.5", | ||
"standard-version": "^9.5.0", | ||
"typescript": "^5.3.3" | ||
} | ||
} |