Skip to content

Commit f9c3998

Browse files
committed
updated all dependencies, made the NODE_ENV and ELEVENTY_ENV actually show up in meta., added the 404 page, and improved the build process of eleventy to rerender on stylesheet changes.
1 parent a029798 commit f9c3998

File tree

7 files changed

+326
-1156
lines changed

7 files changed

+326
-1156
lines changed

Diff for: .eleventy.js

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const { DateTime } = require("luxon")
21
const readingTime = require('eleventy-plugin-reading-time')
32
const embedEverything = require("eleventy-plugin-embed-everything")
43
const pluginRss = require("@11ty/eleventy-plugin-rss")
@@ -20,6 +19,8 @@ module.exports = (config) => {
2019
config.addPlugin(readingTime)
2120
config.addPlugin(embedEverything)
2221

22+
config.addWatchTarget("./assets/scss/")
23+
2324
// Transforms
2425
Object.keys(transforms).forEach((transformName) => {
2526
config.addTransform(transformName, transforms[transformName])
@@ -103,9 +104,7 @@ module.exports = (config) => {
103104
config.addFilter("markdown", (content) => md.render(content))
104105

105106
md.use(markdownItAnchor, {
106-
permalink: true,
107-
permalinkClass: 'direct-link',
108-
permalinkSymbol: '',
107+
permalink: markdownItAnchor.permalink.headerLink({ safariReaderFix: true })
109108
})
110109

111110
md.use(markdownItFootnote)
@@ -206,9 +205,6 @@ module.exports = (config) => {
206205
config.setLibrary("md", md)
207206

208207
return {
209-
dir: {
210-
output: `_site`,
211-
},
212208
// dir: {
213209
// output: "dist",
214210
// input: "src",

Diff for: 404.njk

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Error - Sometimes it Happens…
3+
permalink: 404.html
4+
---
5+
6+
<center>
7+
8+
<h1>Whoopsie… 404 Not found</h1>
9+
10+
<p>Sorry, the site you tried to open was not found.</p>
11+
12+
<p>Maybe try the search?</p>
13+
14+
<p>Here is a represenation of my server…</p>
15+
16+
<img src="https://cataas.com/cat/fail" title="My server goes booooom…" width=100% alt="Gif of a cat failing to do something.">
17+
18+
</center>

Diff for: _data/meta.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = {
1313
},
1414
authorEmail: "chris@chrisspiegl.com",
1515
build: {
16-
env: process.env.ELEVENTY_ENV,
16+
env: process.env.ELEVENTY_ENV || process.env.NODE_ENV || 'development',
1717
timestamp: new Date(),
1818
},
1919
};

Diff for: _includes/layout.pug

+4-2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ head
3737
link(rel="alternate", href="/feed.xml", type="application/atom+xml", title=`${meta.siteTitle} Atom Feed`)
3838

3939
body
40+
if meta.build.env === 'development'
41+
header.development(style="padding: .2rem 0; margin: 0; background-color: rgba(255, 105, 97, 0.5); min-width: 100%; width: 100%; min-height: 0; height: auto; display: block; border-bottom: 2px solid rgb(255,105,97); text-align: center;")= `DEVELOPMENT | ${ global.dateHtml(meta.build.timestamp) }`
4042
header.container
4143
section
4244
- const avatarImage = '/assets/images/other/avatar-2015-05-17-at-18-31-56-square-mini.jpg'
@@ -58,7 +60,7 @@ body
5860
a(href="/now") Now
5961
li
6062
a(href="/consulting") Consulting
61-
63+
6264
li
6365
a(href="/courses", title="Skillshare Profile — External Link", target="_blank") Courses
6466
li
@@ -76,7 +78,7 @@ body
7678
a(href="/twitter", title="Twitter Profile — External Link", target="_blank") Twitter
7779
li
7880
a(href="/newsletter") Newsletter
79-
81+
8082
li
8183
a(href="/newsletter/archive", title="Creation Overview", target="_blank") Creations
8284
li

Diff for: build.txt.njk

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ eleventyExcludeFromCollections: true
44
layout: blank
55
---
66
LAST BUILD: {{ meta.build.timestamp | dateToISO }}
7-
ENV: {{ meta.build.env}}
7+
ENV: {{ meta.build.env }}

Diff for: package.json

+12-10
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,34 @@
2222
},
2323
"license": "UNLICENSED",
2424
"devDependencies": {
25-
"@11ty/eleventy": "^0.11.1",
25+
"@11ty/eleventy": "^1.0.0-beta.5",
2626
"@11ty/eleventy-plugin-rss": "^1.1.2",
2727
"@11ty/eleventy-plugin-syntaxhighlight": "^3.1.3",
2828
"@gerhobbelt/markdown-it-responsive": "^0.1.1-3",
2929
"async-git": "^1.13.2",
30-
"axios": "^0.21.4",
31-
"clean-css": "^4.2.4",
32-
"critical": "^2.0.6",
30+
"axios": "^0.24.0",
31+
"clean-css": "^5.2.2",
32+
"critical": "^4.0.1",
3333
"cross-env": "^7.0.3",
3434
"cssesc": "^3.0.0",
3535
"csvtojson": "^2.0.10",
3636
"eleventy-plugin-embed-everything": "^1.13.3",
3737
"eleventy-plugin-reading-time": "0.0.1",
3838
"html-minifier": "^4.0.0",
39-
"linkinator": "^2.16.0",
39+
"linkinator": "^2.16.1",
4040
"littlefoot": "^3.4.1",
41-
"luxon": "^1.28.0",
42-
"markdown-it": "^11.0.1",
43-
"markdown-it-anchor": "^5.3.0",
41+
"luxon": "^2.1.1",
42+
"markdown-it": "^12.2.0",
43+
"markdown-it-anchor": "^8.4.1",
4444
"markdown-it-container": "^3.0.0",
4545
"markdown-it-footnote": "^3.0.3",
4646
"moment": "^2.29.1",
47-
"node-sass": "^4.14.1",
4847
"npm-run-all": "^4.1.5",
4948
"qrcode": "^1.4.4",
50-
"sharp": "^0.25.4",
49+
"sharp": "^0.29.2",
5150
"shx": "^0.3.3"
51+
},
52+
"dependencies": {
53+
"sass": "^1.43.4"
5254
}
5355
}

0 commit comments

Comments
 (0)