diff --git a/functions/story-image-axis.svg.js b/functions/story-image-axis.svg.js new file mode 100644 index 0000000..3ff5027 --- /dev/null +++ b/functions/story-image-axis.svg.js @@ -0,0 +1,60 @@ +exports.handler = async function(event, context) { + const { + //path, // Path parameter + //httpMethod, // Incoming request’s method name + // headers, // {Incoming request headers} + queryStringParameters, // {query string parameters } + // body, // A JSON string of the request payload + // isBase64Encoded, // A boolean flag to indicate if the applicable request payload is Base64-encode + } = event + + // console.log('queryStringParameters', queryStringParameters) + + const { + width = 200, + height = 100, + heading = 'Does It ARM' + } = queryStringParameters + + return { + statusCode: 200, + headers: { + 'Content-Type': 'image/svg+xml', + }, + body: /* html */` + + + + + + + + + + + + + + + + + + + + + + +
${ heading }
+
+
+ ` + } +} diff --git a/netlify.toml b/netlify.toml index 068c665..fa35c52 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,7 @@ [build] publish = "dist/" command = "npm run generate --quiet" + functions = "functions/" @@ -16,7 +17,7 @@ from = "/app/node" to = "/app/nodejs" status = 301 - + # old git redirect [[redirects]] from = "/app/git" @@ -34,16 +35,16 @@ from = "/kind/photo-tools" to = "/kind/photo-and-graphic-tools/" status = 301 - - + + # Other Redirects - + # Random broken link from Chinese sites [[redirects]] from = "/。" to = "/" status = 301 - + [[redirects]] from = "/%E3%80%82" to = "/"