Skip to content

Commit f7047a3

Browse files
committed
port hand-rolled golang ssg site to eleventy/11ty
convert most pages to webc implement draft posts with eleventyExcludeFromCollections: true add "postTags" collection, fix /blog/tags and /blog/tags/[tag] pages, fix sitemap accidentally using a layout migrated all nunjucks templates and layouts to webc fix 'posts' being added to all /blog/**/* files move /blog/tags/tag.11tydata.js data to /blog/tags/tag.webc frontmatter add pico.css, add tags list to blog posts remove tailwind, setup several 11ty plugins, and more - removed tailwind and tailwind classes from the site - added a <post-tags> and <main-nav> component - added `eleventy-plugin-validate` and `zod` so that I can enforce frontmatter data schemas for my collections - fixed a bug with the 404 page, needed a permalink of 404.html to work properly with eleventy's dev server and on Netlify - added `markdown-it-anchor` dependency and customized the `markdown-it` configuration for Markdown files so that all headings are automatically turned into links - bumped to from the v4 to v5 of the `3.0.0-alpha` for eleventy - added config option so that all markdown blog posts that have filenames starting with an `_` underscore will not be processed in production builds - updated `jsconfig.json` with a few config options to validate my JS with TS, and also added an auto-generated `global.d.ts` file that is updated based upon the result of each eleventy build (hooks into 11ty's "after" event hook) - implememented the syntax-highlight and render 11ty plugins - fixed pagination issue with the `/blog/tags/tag.webc` file add aria-current to <main-nav> component implement RSS plugin with rss, atom, and json feeds. add collections dependencies to various places in our build add netlify.toml with redirect for rss feed to new location create "drafts" folder for posts, add patch-package to fix permalink: false throwing error in prod build remove global.d.ts setup for now feat: remove global "layout" default and "layout: null" overrides feat: use 11ty to concat/process CSS files with a nunjucks template chore: use eleventy-plugin-validate types instead of custom jsdoc types feat: eleventy-plugin-lightningcss written and consumed fix: use 11ty output dir instead of input for lightningCSS wip @Property declarations with fallbacks added WebC css/js bundles and defer bucket, use base-html.webc as wrapper layout for base.webc and post.webc implement <post-toc> custom element for blog post table of contents add InputPathToUrl plugin and update relevant URLs added 'critical' inline webc bundle, fixed webc bundling bug disabled prettier for webc and removed all self-closing tags [See this Jake Archibald article](https://jakearchibald.com/2023/against-self-closing-tags-in-html/) on why self-closing tags that Prettier auto-formats to are actually not part of the spec fix heading levels in astro blog post add global UTC date/datetime helper functions refactor: eleventy-plugin-lightningcss configures 11ty to process CSS templates instead of in "eleventy.after" lifecycle event refactor(eleventy-plugin-lightningcss): add filter for lightningCSS refactor(eleventy-plugin-lightningcss): remove filter, add support for processing WebC CSS bundles with Lightning CSS, add browserslist dependency chore: updated 11ty links port over features and content from main branch deployed site to work with 11ty
1 parent b68ad50 commit f7047a3

File tree

145 files changed

+6963
-4446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+6963
-4446
lines changed

.djlintrc

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://json.schemastore.org/djlint.json",
3+
"profile": "nunjucks",
4+
"indent": 2,
5+
"format_css": true,
6+
"css": {
7+
"indent_size": 2
8+
},
9+
"format_js": true,
10+
"js": {
11+
"indent_size": 2
12+
},
13+
"blank_line_after_tag": "load,extends,include,set",
14+
"preserve_blank_lines": false
15+
}

.env.example

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SITE_ENV=development # 'development' | 'production'

.gitignore

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
# site build output
2-
www/
1+
# build output
2+
_site/
33

4-
# build output for go program and local bin for tool dependencies
5-
bin/
6-
7-
# templ output files
8-
*_templ.go
9-
*_templ.txt
4+
# 11ty fetch cache directory
5+
.cache/
106

117
# dependencies
128
node_modules/
@@ -19,7 +15,11 @@ pnpm-debug.log*
1915

2016
# environment variables
2117
.env
18+
.env.local
2219
.env.production
2320

2421
# macOS-specific files
2522
.DS_Store
23+
24+
# tailwind built css
25+
src/assets/styles.css

Makefile

-163
This file was deleted.

README.md

+1-26
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,3 @@
11
# bensmith.sh
22

3-
## Project structure
4-
5-
| Folder | Description |
6-
|-------------|-------------|
7-
| bin/ | the built go app and tool dependency binaries (a project-local `$GOBIN`) |
8-
| cmd/ | the go applications (`package main`) |
9-
| components/ | Templ components used in the app's routes |
10-
| content/ | All markdown files that we will process into routes on the site |
11-
| docs/ | Any extra documentation or notes for the project |
12-
| routes/ | Templ components that correspond to a specific route on the site |
13-
| scripts/ | Miscellaneous build scripts, the Makefile uses some of them |
14-
| static/ | The static assets (JS, fonts, images, `robots.txt`, etc) copied into the final build |
15-
| styles/ | CSS files that we bundle into one file for the site, `styles/index.css` is the entrypoint |
16-
| templates/ | text/template and html/template files used to generate feeds |
17-
| www/ | the final build of the static site |
18-
| Makefile | Task runner, run `make` to see the help menu for the available task scripts |
19-
| tools.go | List of tool dependencies for this project |
20-
21-
22-
## Go packages
23-
24-
| Package | Description |
25-
|-------------|-------------|
26-
| bs | the top-level package where most files should live |
27-
| components | Templ components used in the app's routes |
28-
| routes | Templ components that correspond to a specific route on the site |
3+
My personal website built using [Eleventy](https://11ty.dev/)

0 commit comments

Comments
 (0)