Skip to content

Instantly share code, notes, and snippets.

Last active December 8, 2022 20:42
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Eleventy 11ty.js Extensions
import h from "vhtml";
export const data = {
title: "Eleventy 11ty.js Extensions",
interface Context {
log(message: string): void;
interface Data {
readonly title: string;
export function render(this: Context, { title }: Data) {
return (
<html lang="en">
<main className="container">
Example repo to show the value of{" "}
<a href="">
"name": "11ty-extensions",
"description": "Example repo to show the value of",
"scripts": {
"build": "node --require esbuild-register node_modules/.bin/eleventy",
"start": "node --require esbuild-register node_modules/.bin/eleventy --incremental --serve",
"postinstall": "patch-package"
"repository": {
"type": "git",
"url": "git+ssh://"
"devDependencies": {
"@11ty/eleventy": "^1.0.0",
"@types/vhtml": "^2.2.4",
"esbuild-register": "^3.3.2",
"patch-package": "^6.4.7",
"typescript": "^4.6.3",
"vhtml": "^2.2.0"
"compilerOptions": {
"target": "es2021", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
"jsx": "react", /* Specify what JSX code is generated. */
"jsxFactory": "h", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
"module": "commonjs", /* Specify what module code is generated. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
"strict": true, /* Enable all strict type-checking options. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment