Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site preview images and some other metadata bits #22

Merged
merged 4 commits into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ module.exports = function (eleventyConfig) {
return dateToCheck < today;
});

// Filter to format the date in the same way we're doing it clientside, to be used in places
eleventyConfig.addFilter("formatTheDate", (date) => {
return new Intl.DateTimeFormat('default', {
month: 'long',
day: 'numeric',
hour: 'numeric',
hour12: true,
timeZoneName: 'short'
})
.format(new Date(date))
})

eleventyConfig.addFilter("slug", (str) => {
if (!str) {
return;
Expand Down
10 changes: 10 additions & 0 deletions .postcssrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
plugins: [
require('postcss-base64')({
extensions: ['.svg'],
root: 'src/sass'
}),
require('autoprefixer')(),
require('cssnano')(),
],
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# jsnotoxford
# NotJSOxford

Site source for https://not.jsoxford.com, a maybe js, not oxford series of online livestreamed zoom group chats about various topics.

Expand Down
Loading