Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit af83af3

Browse files
Update docs
1 parent ce76783 commit af83af3

File tree

3 files changed

+30
-28
lines changed

3 files changed

+30
-28
lines changed

‎docs/00-setup.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ title: Setup
44
permalink: /setup/
55
---
66

7-
# Prerequisites
7+
## Prerequisites
88

99
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:
1010

11-
* [AWS Serverless Application Repository](https://aws.amazon.com/serverless/serverlessrepo)
12-
* [AWS Lambda](https://aws.amazon.com/lambda)
11+
- [AWS Serverless Application Repository](https://aws.amazon.com/serverless/serverlessrepo)
12+
- [AWS Lambda](https://aws.amazon.com/lambda)
1313

14-
# Serverless application deployment
14+
## Serverless application deployment
1515

1616
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:
1717

18-
*Deploy through AWS Serverless Application Repository
19-
*Deploy through AWS Lambda console
18+
-[Deploy through AWS Serverless Application Repository](#deploy-through-aws-serverless-application-repository)
19+
-[Deploy through AWS Lambda console](#deploy-through-aws-lambda-console)
2020

21-
## Deploy through AWS Serverless Application Repository
21+
### Deploy through AWS Serverless Application Repository
2222

2323
1. Open https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us-east-1:990551184979:applications~lambda-layer-canvas-nodejs
2424
2. Click **Deploy** button
@@ -28,7 +28,7 @@ Once you have your AWS account ready, there are two ways to deploy [lambda-layer
2828
6. Deployment is started and in progress
2929
7. Check your AWS Lambda console once the deployment is completed
3030

31-
## Deploy through AWS Lambda console
31+
### Deploy through AWS Lambda console
3232

3333
1. Login to your AWS account and open your AWS Lambda console
3434
2. Click **Create function** button
@@ -40,13 +40,13 @@ Once you have your AWS account ready, there are two ways to deploy [lambda-layer
4040
8. Deployment is started and in progress
4141
9. Check your AWS Lambda console once the deployment is completed
4242

43-
## Using canvas layer
43+
### Using canvas layer
4444

45-
After the deployment is completed, you may refer to [[Using Canvas Layer|Using Canvas Layer]] and follow an example where a Lambda function uses the canvas layer to generate PNG graphic with colored text and circle rendered.
45+
After the deployment is completed, you may refer to [usage example]({% 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.
4646

47-
##Environment setup
47+
### Setup environment to build the layer
4848

49-
When using nodejs-18.x in Amazon Linux, it requires glibc-2.28, meanwhile, compiling glibc-2.28 requires make-4.x or later[^1].
49+
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].
5050

5151
```console
5252
$ wget https://ftp.gnu.org/gnu/make/make-4.3.tar.gz
@@ -90,8 +90,10 @@ GLIBC_2.28
9090
GLIBC_PRIVATE
9191
...
9292
```
93+
94+
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.
95+
9396
---
9497

9598
[^1]: [Centos 7 升级 Glibc-2.28](https://cloud.tencent.com/developer/article/2021784)
96-
9799
[^2]: [CentOS 7.6 编译安装最新版本glibc2.30 实录](https://www.jianshu.com/p/1070373a50f6)

‎docs/01-use.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ permalink: /use/
66

77
## Using canvas layer in function
88

9-
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](/setup/) for details. Then, you may create your Lambda function using:
9+
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 to [setup information](/setup/) for details. Then, you may create your Lambda function using:
1010

1111
* AWS Lambda console editor; or
1212
* Local tool in your machine; or
@@ -16,7 +16,7 @@ Following is an example where a Lambda function uses the canvas layer to generat
1616

1717
## Function structure
1818

19-
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 which could be originally found in Amazon Linux 2 EC2 instance.
19+
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.
2020

2121
```
2222
/var/task/
@@ -29,7 +29,7 @@ The setup of the function may look like the following structure. For font file,
2929

3030
## Font configuration using fonts.config
3131

32-
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.
32+
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].
3333

3434
```xml
3535
<?xml version="1.0"?>
@@ -87,7 +87,7 @@ As a result, the generated PNG graphic with colored text and circle rendered may
8787

8888
![](/assets/DejaVuSansCircle.png)
8989

90-
# References
90+
---
9191

92-
1. [AWS Lambda Fonts & libfontconfig](https://medium.com/creditorwatch/aws-lambda-fonts-libfontconfig-5e837281a4ce)
93-
2. [DejaVu Fonts](https://dejavu-fonts.github.io/)
92+
[^1]: [AWS Lambda Fonts & libfontconfig](https://medium.com/creditorwatch/aws-lambda-fonts-libfontconfig-5e837281a4ce)
93+
[^2]: [DejaVu Fonts](https://dejavu-fonts.github.io/)

‎docs/_includes/footer.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
<div class="footer-col-wrapper">
77
<div class="footer-col">
88
<div class="social-links">
9-
{%- if site.author %}
10-
<ul class="contact-list">
11-
{% if site.author.name -%}
9+
{%- include social.html -%}
10+
</div>
11+
{%- if site.author %}
12+
<ul class="contact-list">
13+
{% if site.author.name -%}
1214
<li class="p-name">{{ site.author.name | escape }}</li>
13-
{% endif -%}
14-
{% if site.author.email -%}
15+
{% endif -%}
16+
{% if site.author.email -%}
1517
<li><a class="u-email" href="mailto:{{ site.author.email }}">{{ site.author.email }}</a></li>
16-
{%- endif %}
17-
</ul>
1818
{%- endif %}
19-
{%- include social.html -%}
20-
</div>
19+
</ul>
20+
{%- endif %}
2121
</div>
2222
<div class="footer-col">
2323
<p>{{ site.description | escape }}</p>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /