Skip to content

Commit

Permalink
added cicd github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre Awaragi committed Jun 27, 2021
1 parent 2a99ba4 commit f88e0ca
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 5 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Node.js Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v2
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
# Defaults to the user or organization that owns the workflow file
scope: '@octocat'
- run: yarn
- run: yarn test
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,28 @@

## Installation

Add plugin to .eleventy.js configuration file and optionally provide a private Plantuml server
> This plugin requires markdown syntax highlighter plugin to work.
Add Eleventy syntaxhighlight plugin
```javascript
const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight');
```

Add plugin to .eleventy.js configuration file and optionally provide the configuration for private Plantuml server
```javascript
eleventyConfig.addPlugin(syntaxHighlight);
eleventyConfig.addPlugin(plantuml, {
hostname: "localhost",
port: 8888,
prefix: ""
prefix: "",
imgClass: "plantuml"
});
```

if options are omited, the plugin defaults to <http://plnntuml.com/plantuml> server for conversion.

The generated img tag will have class plantuml assigned to it. This can be override using options.imgClass value.

## Using in templates
Simply create a markdown code block of type plantuml and it will be replaced by an img with inline png src (dataurl).

Expand Down
19 changes: 16 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,26 @@
"repository": "[email protected]:awaragi/eleventy-plugin-plantuml.git",
"author": "Pierre Awaragi <[email protected]>",
"license": "MIT",
"keywords": [
"11ty",
"eleventy",
"plantuml",
"plugin",
"diagram",
"markdown",
"highlighter",
"share"
],
"bugs": {
"url": "https://github.com/awaragi/eleventy-plugin-plantuml/issues"
},
"scripts": {
"test": "jest test"
},
"devDependencies": {
"jest": "^27.0.5"
},
"dependencies": {
"sync-request": "^6.1.0"
},
"devDependencies": {
"jest": "^27.0.5"
}
}

0 comments on commit f88e0ca

Please sign in to comment.