diff --git a/.gitignore b/.gitignore
index d620cad..0b39cc7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,7 @@
+.idea/
+docs/.jekyll-cache
+docs/_site
+docs/Gemfile.lock
nodejs/node_modules
nodejs/node*/node_modules
nodejs/package*.json
diff --git a/README.md b/README.md
index 1bd4789..dff80f0 100644
--- a/README.md
+++ b/README.md
@@ -2,34 +2,34 @@
![GitHub](https://img.shields.io/github/license/charoitel/lambda-layer-canvas-nodejs)
-[lambda-layer-canvas-nodejs](https://github.com/charoitel/lambda-layer-canvas-nodejs) published on [AWS Serverless Application Repository](https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us-east-1:990551184979:applications~lambda-layer-canvas-nodejs) packages node-canvas and its dependencies as AWS Lambda Layer.
+Canvas Layer for AWS Lambda is published and available on [AWS Serverless Application Repository](https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us-east-1:990551184979:applications~lambda-layer-canvas-nodejs), and GitHub at [charoitel/lambda-layer-canvas-nodejs](https://github.com/charoitel/lambda-layer-canvas-nodejs). The layer aims to provide a Cairo backed Mozilla Web Canvas API implementation layer for AWS Lambda, powered by [node-canvas](https://github.com/Automattic/node-canvas).
## About node-canvas
-[node-canvas](https://github.com/Automattic/node-canvas) is a Cairo backed Canvas implementation for Node.js. It implements the [Mozilla Web Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) as closely as possible. For the current API compliance, please check [Compatibility Status](https://github.com/Automattic/node-canvas/wiki/Compatibility-Status).
+[node-canvas](https://github.com/Automattic/node-canvas) is a Cairo backed Canvas implementation for Node.js. It implements the [Mozilla Web Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) as closely as possible. For the latest API compliance, you may check [Compatibility Status](https://github.com/Automattic/node-canvas/wiki/Compatibility-Status).
## How this layer is built?
-The Lambda Layer is built from source of node-canvas npm package on [amazonlinux](https://hub.docker.com/_/amazonlinux) dev container instance, with following native dependencies installed. Please check ``` build-layer.sh ``` for details.
+The layer is built from source of node-canvas npm package on [amazonlinux](https://hub.docker.com/_/amazonlinux) dev container instance, with following native dependencies installed. You may check the build layer script, ``` build-layer.sh ```, which is available in repository, for details.
```bash
gcc-c++ cairo-devel pango-devel libjpeg-turbo-devel giflib-devel librsvg2-devel pango-devel bzip2-devel jq python3
```
-Since AWS Lambda is a secure and isolated runtime and execution environment, this layer aims to target AWS Lambda compatible build. As there are canvas libraries and frameworks relying on node-canvas running on Node.js runtime, this layer also tries to include and support these libraries and frameworks.
+Since AWS Lambda is a secure and isolated runtime and execution environment, the layer aims to target AWS Lambda compatible and native build. As there are canvas libraries and frameworks relying on node-canvas running on Node.js runtime, this layer may also try to include and support those libraries and frameworks. Currently, following libraries and frameworks are included when building and packaging the layer:
-### Fabric.js support
-
-[Fabric.js](https://github.com/fabricjs/fabric.js) is a framework that makes it easy to work with HTML5 canvas element. It is an interactive object model on top of canvas element. It is also an SVG-to-canvas (and canvas-to-SVG) parser.
+- [Chart.js](#chartjs-support)
+- [Fabric.js](#fabricjs-support)
+- [Konva](#konva-support)
-### Konva support
+### Chart.js support
-[Konva](https://github.com/konvajs/konva) is a framework that enables high performance animations, transitions, node nesting, layering, filtering, caching, event handling for desktop and mobile applications, and much more.
+[Chart.js](https://github.com/chartjs/chart.js) provides a set of frequently used chart types, plugins, and customization options. In addition to a reasonable set of built-in chart types, there are also community-maintained chart types.
-> **Note:** From Canvas Layer v2.9.3 release, since konva-node package is deprecated, konva package is used directly through build script.
+### Fabric.js support
-## Getting started
+[Fabric.js](https://github.com/fabricjs/fabric.js) provides a missing and interactive object model for canvas, as well as an SVG parser, layer of interactivity, and a whole suite of other indispensable tools.
-To get started, please visit https://github.com/charoitel/lambda-layer-canvas-nodejs/wiki/Getting-Started
+### Konva support
-Made with ❤️ by Charoite Lee and contributors. Available on the [AWS Serverless Application Repository](https://aws.amazon.com/serverless)
+[Konva](https://github.com/konvajs/konva) enables high performance animations, transitions, node nesting, layering, filtering, caching, event handling for desktop and mobile applications, and much more.
diff --git a/build-layer.sh b/build-layer.sh
index eb40c77..e2bdb24 100755
--- a/build-layer.sh
+++ b/build-layer.sh
@@ -14,12 +14,13 @@ set -e
LAYER_NAME=canvas-nodejs
LAYER_DESCRIPTION="AWS Lambda Layer with node-canvas and its dependencies packaged, provides a Cairo backed Mozilla Web Canvas API implementation with additional features."
-LAYER_VERSION=2.11.2
+LAYER_VERSION=2.11.3
LAYER_AUTHOR="Charoite Lee"
DOT_CHAR="."
NODE_VERSION=$(node -v)
NODE_VERSION=${NODE_VERSION:1}
+SEMVER_VERSION=7.5.4
# Remove packaged layer if exists
if [ -n "$(find . -name 'canvas-nodejs_v*.zip')" ]; then
@@ -36,13 +37,15 @@ npm init -y
npm install canvas --build-from-source
npm install fabric
npm install konva
+npm install chart.js
npm install mocha --save-dev
-jq --arg LAYER_NAME "$LAYER_NAME" --arg LAYER_DESCRIPTION "$LAYER_DESCRIPTION" --arg LAYER_VERSION "$LAYER_VERSION" --arg LAYER_AUTHOR "$LAYER_AUTHOR" '.name = $LAYER_NAME | .description = $LAYER_DESCRIPTION | .version = $LAYER_VERSION | .license = "MIT" | .author = $LAYER_AUTHOR | .scripts.test = "mocha"' package.json > package-tmp.json
+jq --arg LAYER_NAME "$LAYER_NAME" --arg LAYER_DESCRIPTION "$LAYER_DESCRIPTION" --arg LAYER_VERSION "$LAYER_VERSION" --arg LAYER_AUTHOR "$LAYER_AUTHOR" --arg SEMVER_VERSION "$SEMVER_VERSION" '.name = $LAYER_NAME | .description = $LAYER_DESCRIPTION | .version = $LAYER_VERSION | .license = "MIT" | .author = $LAYER_AUTHOR | .scripts.test = "mocha" | .overrides.semver = $SEMVER_VERSION ' package.json > package-tmp.json
mv -f package-tmp.json package.json
# Test if installed modules and dependencies work fine
npm test
cp package-lock.json ..
+npm rm mocha
# Prepare and package layer
mkdir node${NODE_VERSION%%$DOT_CHAR*}
diff --git a/docs/00-setup.md b/docs/00-setup.md
new file mode 100644
index 0000000..79b9757
--- /dev/null
+++ b/docs/00-setup.md
@@ -0,0 +1,99 @@
+---
+layout: page
+title: Setup
+permalink: /setup/
+---
+
+## Prerequisites
+
+In order to start to use [lambda-layer-canvas-nodejs](https://github.com/charoitel/lambda-layer-canvas-nodejs) published on [AWS Serverless Application Repository](https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us-east-1:990551184979:applications~lambda-layer-canvas-nodejs), you must have your AWS account with following services available:
+
+- [AWS Serverless Application Repository](https://aws.amazon.com/serverless/serverlessrepo)
+- [AWS Lambda](https://aws.amazon.com/lambda)
+
+## Serverless application deployment
+
+Once you have your AWS account ready, there are two ways to deploy [lambda-layer-canvas-nodejs](https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us-east-1:990551184979:applications~lambda-layer-canvas-nodejs) and make it available in your AWS Lambda console:
+
+- [Deploy through AWS Serverless Application Repository](#deploy-through-aws-serverless-application-repository)
+- [Deploy through AWS Lambda console](#deploy-through-aws-lambda-console)
+
+### Deploy through AWS Serverless Application Repository
+
+1. Open https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us-east-1:990551184979:applications~lambda-layer-canvas-nodejs
+2. Click **Deploy** button
+3. Login to your AWS account if you haven't login yet
+4. Edit **_Name_** (Optional)
+5. Click **Deploy** button
+6. Deployment is started and in progress
+7. Check your AWS Lambda console once the deployment is completed
+
+### Deploy through AWS Lambda console
+
+1. Login to your AWS account and open your AWS Lambda console
+2. Click **Create application** button
+3. Select **_Serverless application_**
+4. Input `lambda-layer-canvas-nodejs` into search box and press _Enter_ key
+5. Click on the title of `lambda-layer-canvas-nodejs` card
+6. Edit **_Name_** (Optional)
+7. Click **Deploy** button
+8. Deployment is started and in progress
+9. Check your AWS Lambda console once the deployment is completed
+
+### Using canvas layer
+
+After the deployment is completed, you may refer [usage example](/lambda-layer-canvas-nodejs/{% link 01-use.md %}) and follow the example where a Lambda function uses the canvas layer to generate PNG graphic with colored text and circle rendered.
+
+## Setup environment to build the layer
+
+Alternately, you may setup your own environment to build the layer according to your specific needs. When using the layer with nodejs-18.x in Amazon Linux, it requires glibc-2.28, meanwhile, compiling glibc-2.28 requires make-4.x or later[^1].
+
+```console
+$ wget https://ftp.gnu.org/gnu/make/make-4.3.tar.gz
+$ tar -xzvf make-4.3.tar.gz
+$ cd make-4.3/
+$ ./configure --prefix=/usr
+$ make
+$ make install
+```
+Once make-4.x or later is ready, we may start to compiling glibc-2.28 on Amazon Linux. However, during `make install` there would be an error due to `cannot found -lnss_test2` which could be ignored[^2].
+
+```console
+$ wget https://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.gz
+$ tar -xzvf glibc-2.28.tar.gz
+$ cd glibc-2.28
+$ mkdir build && cd build
+$ ../configure --prefix=/usr --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
+$ make
+$ make install
+...
+/usr/bin/ld: cannot find -lnss_test2
+collect2: error: ld returned 1 exit status
+Execution of gcc -B/usr/bin/ failed!
+...
+```
+
+To test if the installation of the compiled glibc-2.28 is success or not, we may check if `GLIBC_2.28` is enabled[^1] [^2].
+
+```console
+$ ls -l /lib64/libc.so.6
+lrwxrwxrwx 1 root root 12 Jul 3 15:14 /lib64/libc.so.6 -> libc-2.28.so
+$ strings /lib64/libc.so.6 | grep GLIBC
+...
+GLIBC_2.22
+GLIBC_2.23
+GLIBC_2.24
+GLIBC_2.25
+GLIBC_2.26
+GLIBC_2.27
+GLIBC_2.28
+GLIBC_PRIVATE
+...
+```
+
+Once your environment is ready, you may execute the build layer script, ``` build-layer.sh ```, to build the layer and deploy through the AWS Lambda console.
+
+---
+
+[^1]: [Centos 7 升级 Glibc-2.28](https://cloud.tencent.com/developer/article/2021784)
+[^2]: [CentOS 7.6 编译安装最新版本glibc2.30 实录](https://www.jianshu.com/p/1070373a50f6)
\ No newline at end of file
diff --git a/docs/01-use.md b/docs/01-use.md
new file mode 100644
index 0000000..4a432ba
--- /dev/null
+++ b/docs/01-use.md
@@ -0,0 +1,93 @@
+---
+layout: page
+title: Use
+permalink: /use/
+---
+
+## Using canvas layer in function
+
+Before starting to use the canvas layer, it is required to have the layer deployed through AWS Serverless Application Repository or AWS Lambda console, you may refer [setup information](/lambda-layer-canvas-nodejs/{% link 00-setup.md %}) for details. Then, you may create your Lambda function using:
+
+* AWS Lambda console editor; or
+* Local tool in your machine; or
+* Any way you may prefer
+
+Following is an example where a Lambda function uses the canvas layer to generate PNG graphic with colored text and circle rendered. There is no environment variable setting is required in this example.
+
+## Function structure
+
+The setup of the function may look like the following structure. For font file, you may use any supported font file you like, in this example, we are going to use DejaVu Sans[^2] which could be originally found in Amazon Linux 2 EC2 instance.
+
+```
+/var/task/
+ .
+ ├── fonts/
+ ├── DejaVuSans.ttf
+ ├── fonts.conf
+ ├── index.js
+```
+
+## Font configuration using fonts.config
+
+Since AWS Lambda does not appear to support even the basic fonts on its own, so we create the fonts directory at the root directory for our Lambda function with following font configuration file[^1].
+
+```xml
+
+
+
+ /var/task/fonts
+ /tmp/fonts-cache/
+
+
+```
+
+## Build function code in index.js
+
+Once the setup is ready, we may put following function code and test it in AWS Lambda console.
+
+```javascript
+let { registerFont, createCanvas } = require('canvas');
+
+exports.handler = async (event) => {
+ registerFont(__dirname.concat('/fonts/DejaVuSans.ttf'), { family: 'DejaVu Sans' });
+
+ let canvas = createCanvas(300, 300);
+ var ctxCircle = canvas.getContext('2d');
+ var X = canvas.width / 2;
+ var Y = canvas.height / 2;
+ var R = 45;
+ ctxCircle.beginPath();
+ ctxCircle.arc(X, Y, R, 0, 2 * Math.PI, false);
+ ctxCircle.lineWidth = 3;
+ ctxCircle.strokeStyle = '#FF9900';
+ ctxCircle.stroke();
+
+ var ctxText = canvas.getContext('2d');
+ ctxText.font = '40px "DejaVu Sans"';
+ ctxText.fillStyle = '#146EB4';
+ ctxText.fillText('DejaVu Sans', 15, 120);
+
+ const response = {
+ statusCode: 200,
+ body: JSON.stringify(canvas.toDataURL()),
+ };
+
+ return response;
+};
+```
+Following is the sample response from the above example function code.
+
+```JSON
+{
+ "statusCode": 200,
+ "body": "\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nO3dd3hc5Zn38e99RpI7LhoZTAvhNRBKKAGWloRACsUyNs0hhJqNLZpkU5bsJrtEpJEC2MgBWwYSEjYJmB7JxlSTpSRLaAmBEKqzNBfJDdvYkubc7x8ajc6ojqwyM/Lvc12+POfRc87cmnLrPOc8BUREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREtkWW7QDyRcnMms+625Mt226cXX9D6X9nMyaBkosWjqRg2OlgR4fGZ8zZARgNJIB1hi9z7K9u/nTBlqIlK+YftzLLIUsvFPTVgXa8vCbe0GiruqnWYPCRwzrwdYYtc3gR54UCgmeXzz2xu/23afHy2qswrm7ZNvjVqqrS83p93Fk1XyC0pZGiv9dVle7T2+P2q8qFRfHVw77t2GXAKADzdrWGObYDcLi5zUgUNYbxitqn3Lh51LoRdy+77ZjNAxy19FIwwM9X5FAM7A52kMPJwPcwapss/DBeXru0ZGbNV6lc2meJdDBJBH4bELZsO5wWv/KBUb09riWC89sU/aK3x+xP2126ZFx8zfCnwb5LMlllKAA+b87tG7bb0OtELwNvoBNWV2IYX3C3O+L1G18qmVnz2WwHlGvW3DD5/wx7NFI0wj6Ond6bY44rX7ydm58aKWoMLHF7b47Zr2Y8V1iUSCzBOSRS6ji/x+3MwIOJ1rRpVN24TUNCD3Yx7ASMOcB72QpZ+k6/nck4LKuvKv1k2/Jx5Yu3o7BhdCwsLHYPD3W3ww2mAuNSlYx93W1pSUXtZauqSuf2V4x5ycJf4PaVlk03zqMXZ0SB+TRgRKRo8cobpqzoRYT9Kj70w3KwQ1MFxjoPOa1+bumjbeuubk5S7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gNNK96869WxrrsRCYDQQlrG+HVzACqgCGR4r9gXGQzeCZLYfWIz+cQjJuAQyPFWzC+xXSq1M9q8FPC2oYkv/C/AvaJFuP8FvhRcjmxnJO8Hvcdmiffi35mX2ttpg0AAAJ5SURBVCHgXA232XYoYW1jvJpCjItwvg+Miv4IZxHO9+1Cns1WfFE+nwMwLgfOhLRJCjcBP2MsPxosNxAkM0pY2yi/kV0oYDZwagc/fgrj1xRy10D3EE9ec5tG87qBn+2gyl0EXGbTeW8g45LcoIS1jfObOZiQ/wSm0P7zsBmowbmPBEvtYpb3Sww3sgMFHItxMk4pMLRNlRC4H/ihlaVWwJZtkBKWAMnrRDG+jXMaUNhJtVcxHgOeIcE/GMHrdk5qqubMnudGRlLAnjh7YRwJHEv6NbWoRuAujB8lVwySbZwSlqTxX1BCI1+juUl2SHf1gXeBt4E6YAOwAWND88EYCal/cWB3WofOdM54Nrl8/B1a5FSilLCkU34ze5PgVIxjgSNo31TrK5txnsF4jAT32EX8o5+eR/KcEpZkxK9nGMM5EuNonP0w9gImQo/nkW8A3gReo7lbwhMU8IydnxqwLdIpJSzZal5JATuzG86uOGNTTcDm/0k2DZubiMYaQv7JWJblW+96ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER4f8DqOCCaaubKHMAAAAASUVORK5CYII=\""
+}
+```
+As a result, the generated PNG graphic with colored text and circle rendered may look like as follow.
+
+![](/assets/DejaVuSansCircle.png)
+
+---
+
+[^1]: [AWS Lambda Fonts & libfontconfig](https://medium.com/creditorwatch/aws-lambda-fonts-libfontconfig-5e837281a4ce)
+[^2]: [DejaVu Fonts](https://dejavu-fonts.github.io/)
diff --git a/docs/404.html b/docs/404.html
new file mode 100644
index 0000000..086a5c9
--- /dev/null
+++ b/docs/404.html
@@ -0,0 +1,25 @@
+---
+permalink: /404.html
+layout: default
+---
+
+
+
+
+
404
+
+
Page not found :(
+
The requested page could not be found.
+
diff --git a/docs/Gemfile b/docs/Gemfile
new file mode 100644
index 0000000..4e0684e
--- /dev/null
+++ b/docs/Gemfile
@@ -0,0 +1 @@
+gem "minima"
diff --git a/docs/LICENSE.txt b/docs/LICENSE.txt
new file mode 100644
index 0000000..0e7ecd8
--- /dev/null
+++ b/docs/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016-present Parker Moore and the minima contributors
+
+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.
diff --git a/docs/_config.yml b/docs/_config.yml
new file mode 100644
index 0000000..db1c5a2
--- /dev/null
+++ b/docs/_config.yml
@@ -0,0 +1,8 @@
+title: Canvas Layer for AWS Lambda
+description: >
+ Cairo backed Mozilla Web Canvas API implementation layer for AWS Lambda
+theme: minima
+minima:
+ social_links:
+ - { platform: github, user_url: "https://github.com/charoitel/lambda-layer-canvas-nodejs" }
+ - { platform: linkedin, user_url: "https://www.linkedin.com/in/charoitel" }
diff --git a/docs/_includes/custom-head.html b/docs/_includes/custom-head.html
new file mode 100644
index 0000000..61776a1
--- /dev/null
+++ b/docs/_includes/custom-head.html
@@ -0,0 +1 @@
+
diff --git a/docs/_includes/disqus_comments.html b/docs/_includes/disqus_comments.html
new file mode 100644
index 0000000..d9400f2
--- /dev/null
+++ b/docs/_includes/disqus_comments.html
@@ -0,0 +1,20 @@
+{%- if page.comments != false and jekyll.environment == "production" -%}
+
+
+
+
+{%- endif -%}
diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html
new file mode 100644
index 0000000..96c1f42
--- /dev/null
+++ b/docs/_includes/footer.html
@@ -0,0 +1,29 @@
+
diff --git a/docs/_includes/google-analytics.html b/docs/_includes/google-analytics.html
new file mode 100644
index 0000000..b8b4d38
--- /dev/null
+++ b/docs/_includes/google-analytics.html
@@ -0,0 +1,9 @@
+
+
diff --git a/docs/_includes/head.html b/docs/_includes/head.html
new file mode 100644
index 0000000..9ee139f
--- /dev/null
+++ b/docs/_includes/head.html
@@ -0,0 +1,14 @@
+
+
+
+
+ {%- seo -%}
+
+ {%- feed_meta -%}
+ {%- if jekyll.environment == 'production' and site.google_analytics -%}
+ {%- include google-analytics.html -%}
+ {%- endif -%}
+
+ {%- include custom-head.html -%}
+
+
diff --git a/docs/_includes/header.html b/docs/_includes/header.html
new file mode 100644
index 0000000..ed5a382
--- /dev/null
+++ b/docs/_includes/header.html
@@ -0,0 +1,31 @@
+
+
+
\ No newline at end of file
diff --git a/docs/_layouts/page.html b/docs/_layouts/page.html
new file mode 100644
index 0000000..18544b4
--- /dev/null
+++ b/docs/_layouts/page.html
@@ -0,0 +1,14 @@
+---
+layout: base
+---
+
+
+
+
{{ page.title | escape }}
+
+
+
+ {{ content }}
+
+
+
diff --git a/docs/_layouts/post.html b/docs/_layouts/post.html
new file mode 100644
index 0000000..dc71866
--- /dev/null
+++ b/docs/_layouts/post.html
@@ -0,0 +1,38 @@
+---
+layout: base
+---
+
+
+
+