This is a fun project to test Eleventy Serverless plugin and especialy the relatively new config
option. Here's the live site: https://viewsrc.netlify.app/. Try it for yourself:
- Clone the repo:
git clone https://github.com/solution-loisir/view-source.git
- Install dependencies:
npm ci
- Start the dev server:
npm start
Submit a URL using the provided form which trigers a GET request to a Netlify function. Inside the serverless function, the URL is fetched and the content is returned as text in global data using the config
option. The template (index.njk) renders a colorized version using the Syntax highlighting plugin. The same template (index.njk) is used at build time and for serverless rendering.
- Node
v14
- @11ty/[email protected]
- @11ty/[email protected]
- @netlify/[email protected]
- [email protected]