Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
idmyn committed May 11, 2022
0 parents commit f3697cf
Show file tree
Hide file tree
Showing 6 changed files with 2,344 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- uses: pnpm/action-setup@v2.0.1
with:
version: 7.0.0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm semantic-release
10 changes: 10 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
MIT License

Copyright (c) David Mynors

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.

40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# @idmyn/gatsby-remark-wiki-link

A thin wrapper over
[`remark-wiki-link`](https://github.com/landakram/remark-wiki-link) for use with
[Gatsby](https://github.com/gatsbyjs/gatsby).

## Installation

`npm install @idmyn/gatsby-remark-wiki-link`

## Usage

All options passed to this plugin are forwarded to remark-wiki-link. You can
view its supported configuration options
[here](https://github.com/landakram/remark-wiki-link#configuration-options).

``` javascript
// gatsby-config.js
module.exports = {
plugins: [
{
resolve: 'gatsby-transformer-remark',
options: {
plugins: [{
resolve: "@idmyn/gatsby-remark-wiki-link",
options: {
pageResolver: (name) => [name.replace(/ /g, '-').toLowerCase()],
hrefTemplate: (permalink) => `/${permalink}`
}
}],
}
},
],
};
```

## Backlinks

For backlinks, check out
[@idmyn/gatsby-remark-backlinks](https://github.com/idmyn/gatsby-remark-backlinks).
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const wikiLinkPlugin = require('remark-wiki-link')

module.exports.setParserPlugins = options => {
return [[wikiLinkPlugin, options]]
}
40 changes: 40 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "@idmyn/gatsby-remark-wiki-link",
"description": "A thin wrapper over `remark-wiki-link` for use with Gatsby",
"version": "1.0.0",
"keywords": [
"gatsby",
"remark",
"remark-plugin",
"markdown",
"wiki"
],
"release": {
"branches": [
"main"
]
},
"publishConfig": {
"access": "public"
},
"repository": "https://github.com/idmyn/gatsby-remark-wiki-link",
"license": "MIT",
"author": {
"name": "David Mynors",
"email": "hello@davidmyno.rs",
"url": "https://davidmyno.rs"
},
"main": "index.js",
"files": [
"index.js"
],
"scripts": {
"test": "echo 'no tests'"
},
"dependencies": {
"remark-wiki-link": "^1.0.4"
},
"devDependencies": {
"semantic-release": "^19.0.2"
}
}

0 comments on commit f3697cf

Please sign in to comment.