npm init -y && npm install @11ty/eleventy
Update scripts
in package.json
"scripts": {
"develop": "eleventy --serve",
"build": "eleventy"
/* | |
OLD hacky way | |
*/ | |
ul { | |
list-style: none; | |
padding: 0; | |
} | |
li { | |
position: relative; |
/* | |
Project Structure: | |
src/ | |
- sass/ | |
- - style.scss | |
- index.html | |
npm start - copies src files to dist/ and starts Browsersync server at localhost:3000 | |
npm run build - copies files to dist/ and autoprefixes/minifies css |
import * as React from 'react'; | |
import { useLocation } from '@reach/router'; | |
import queryString from 'query-string'; | |
const getSelectedTheme = (query) => { | |
const fallback = 'light'; | |
if (query) { | |
const queriedTheme = queryString.parse(query); |
*[class], | |
*[id] { | |
position: relative; | |
outline: 2px dashed red; | |
} | |
*[class]::before, *[class]::after, | |
*[id]::before, | |
*[id]::after { | |
position: absolute; |
const HighlightPairedShortcode = require("@11ty/eleventy-plugin-syntaxhighlight/src/HighlightPairedShortcode"); | |
const highlightCodeDemo = (code, lang) => { | |
const highlightedCode = HighlightPairedShortcode(code, lang); | |
return highlightedCode; | |
}; |
Join my stream on Twitch to help build this app! Feel free to add comments about additional features we should explore.
{% set imgBase %}/img/post-directory/{% endset %}
![Alt text]({{ imgBase }}img-name.png)
$color-primary: purple; | |
$color-secondary: blue; | |
$color-support: green; | |
$theme-colors: ( | |
primary: $color-primary, | |
secondary: $color-secondary, | |
support: $color-support | |
); |