-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A few things happened: - switched to 11ty v2 - using eleventy-base-blog as a base - restructuring 11ty folder - implementing new design (based on cactus) - new colors used - no fonts loaded - adding sitemap - adding rss feed - using eleventy bundle plugin - playing around with content This should be considered WIP, as things are still looking pretty experimental, but pushing so it gets only quickly :)
- Loading branch information
1 parent
1b92116
commit 23556b8
Showing
62 changed files
with
7,061 additions
and
1,437 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
.idea | ||
node_modules | ||
src/styles/main.css | ||
public/styles/main.css | ||
dist | ||
.parcel-cache |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{#<header class="full-width {{ 'nav' if page.url == '/' else 'back' }}">#} | ||
{# {% if page.url == '/' or page.url == '/404.html' %}#} | ||
{# <div class="left">#} | ||
{# <a href="/about">about</a>#} | ||
{# <span class="point">•</span>#} | ||
{# <a href="/contribute">contribute</a>#} | ||
{# <span class="point">•</span>#} | ||
{# <a href="/contribute">join</a>#} | ||
{# —#} | ||
{# </div>#} | ||
{# <div class="right">#} | ||
{# <a href="/">• back</a>#} | ||
{# </div>#} | ||
{# {% else %}#} | ||
{# <a href="/">• back</a>#} | ||
{# {% endif %}#} | ||
{#</header>#} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
layout: 'layouts/root.njk' | ||
--- | ||
|
||
{# Only include the syntax highlighter CSS on blog posts #} | ||
{%- css %}{% include "node_modules/prismjs/themes/prism-okaidia.css" %}{% endcss %} | ||
{%- css %}{% include "public/css/prism-diff.css" %}{%- endcss %} | ||
|
||
<section> | ||
<h1 class="glitch" data-text="{{ title | stripCodeTag }}">{{ title | safe }}</h1> | ||
|
||
<ul class="post-metadata"> | ||
<li><time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time></li> | ||
{%- for tag in tags | filterTagList %} | ||
{%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %} | ||
<li><a href="{{ tagUrl }}" class="post-tag">{{ tag }}</a>{%- if not loop.last %}, {% endif %}</li> | ||
{%- endfor %} | ||
</ul> | ||
|
||
{{ content | safe }} | ||
</section> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | ||
<title>{{ (title or metadata.title) | stripCodeTag }}</title> | ||
<meta name="description" content="{{ description or metadata.description }}"> | ||
|
||
<link rel="alternate" href="/feed/feed.xml" type="application/atom+xml" title="{{ metadata.title }}"> | ||
<link rel="alternate" href="/feed/feed.json" type="application/json" title="{{ metadata.title }}"> | ||
|
||
<meta name="generator" content="{{ eleventy.generator }}"> | ||
|
||
{%- css %} | ||
{% include "public/css/normalize.css" %} | ||
{% include "public/css/index.css" %} | ||
{% endcss %} | ||
<style>{% getBundle "css" %}</style> | ||
|
||
{# <link rel="preconnect" href="https://fonts.googleapis.com">#} | ||
{# <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>#} | ||
{# <link href="https://fonts.googleapis.com/css2?family=Merriweather:ital@0;1&family=Montserrat:wght@400;500;600;700;800;900&family=Source+Sans+Pro:ital,wght@0,400;0,700;1,400;1,700&family=Catamaran:wght@400;600;700&display=swap" rel="stylesheet">#} | ||
{# <link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,400;0,500;0,600;0,700;0,900;1,400;1,500&display=swap" rel="stylesheet">#} | ||
{# <link href="https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;0,900;1,400&display=swap" rel="stylesheet">#} | ||
{# <link href="https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&display=swap" rel="stylesheet">#} | ||
|
||
{# <link href="https://fonts.googleapis.com/css2?family=Barriecito&family=Barrio&family=Major+Mono+Display&family=Rampart+One&family=Rubik+Glitch&family=Rubik+Moonrocks&display=swap" rel="stylesheet">#} | ||
</head> | ||
<body | ||
data-layout="{{ layout | parseLayoutName }}" | ||
class=" | ||
{%- if page.url == '/' -%}home {% endif %} | ||
{%- if templateClass -%}{{ templateClass }}{%- endif -%} | ||
glitch-{%- if config.enableGlitch -%}enabled{%- else -%}disabled{%- endif -%}" | ||
> | ||
{%- if not hideHeader -%} | ||
{%- include "header.njk" -%} | ||
{%- endif -%} | ||
|
||
<header> | ||
{%- include "nav.njk" -%} | ||
</header> | ||
|
||
<main> | ||
{{ content | safe }} | ||
</main> | ||
|
||
<footer> | ||
<div>footer</div> | ||
{%- include "nav.njk" -%} | ||
</footer> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<nav> | ||
<h2 class="visually-hidden">Top level navigation menu</h2> | ||
<ul class="nav"> | ||
{%- for entry in collections.all | eleventyNavigation %} | ||
<li class="nav-item"> | ||
<span style="pointer-events: none;">{% if entry.url == page.url %}.{% else %} {% endif %}</span><a href="{{ entry.url }}"{% if entry.url == page.url %} aria-current="page"{% endif %}>{{ entry.title }}</a></li> | ||
{# ˙#} | ||
{# •#} | ||
{# ¬#} | ||
{%- endfor %} | ||
</ul> | ||
</nav> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{%- css %} | ||
.posts-list li { | ||
display: flex; | ||
/* align-items: center; */ | ||
margin-top: 8px; /* 16 on mobile */ | ||
} | ||
{% endcss %} | ||
|
||
{% include "tags-list.njk" %} | ||
|
||
<ul class="posts-list"> | ||
{% for post in postslist | reverse %} | ||
<li class="posts-list-item{% if post.url == url %} posts-list-item-active{% endif %}"> | ||
<time class="posts-list-date" datetime="{{ post.date | htmlDateString }}">{{ post.date | readableDate("dd MMM yyyy") }}</time> | ||
<a href="{{ post.url }}" class="posts-list-link">{% if post.data.title %}{{ post.data.title | stripCodeTag }}{% else %}<code>{{ post.url }}</code>{% endif %}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div style="margin-bottom: 2rem; font-size: 12px;"> | ||
[<a href="/tags/">all</a>, | ||
{% for tag in collections.tags | filterTagsList %} | ||
<a href="/tags/{{ tag | slugify | url }}">{{ tag }}</a> | ||
{%- if not loop.last -%},{%- endif -%} | ||
{% endfor %}] | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = { | ||
title: "Eleventy Base Blog v8", | ||
url: "https://example.com/", | ||
language: "en", | ||
description: "I am writing about my experiences as a naval navel-gazer.", | ||
author: { | ||
name: "Your Name Here", | ||
email: "[email protected]", | ||
url: "https://example.com/about-me/" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
function eleventyComputedPermalink() { | ||
// When using `addGlobalData` and you *want* to return a function, you must nest functions like this. | ||
// `addGlobalData` acts like a global data file and runs the top level function it receives. | ||
return (data) => { | ||
// Always skip during non-watch/serve builds | ||
if(data.draft && !process.env.BUILD_DRAFTS) { | ||
return false; | ||
} | ||
|
||
return data.permalink; | ||
} | ||
} | ||
|
||
function eleventyComputedExcludeFromCollections() { | ||
// When using `addGlobalData` and you *want* to return a function, you must nest functions like this. | ||
// `addGlobalData` acts like a global data file and runs the top level function it receives. | ||
return (data) => { | ||
// Always exclude from non-watch/serve builds | ||
if(data.draft && !process.env.BUILD_DRAFTS) { | ||
return true; | ||
} | ||
|
||
return data.eleventyExcludeFromCollections; | ||
} | ||
} | ||
|
||
module.exports.eleventyComputedPermalink = eleventyComputedPermalink; | ||
module.exports.eleventyComputedExcludeFromCollections = eleventyComputedExcludeFromCollections; | ||
|
||
module.exports = eleventyConfig => { | ||
eleventyConfig.addGlobalData("eleventyComputed.permalink", eleventyComputedPermalink); | ||
eleventyConfig.addGlobalData("eleventyComputed.eleventyExcludeFromCollections", eleventyComputedExcludeFromCollections); | ||
|
||
let logged = false; | ||
eleventyConfig.on("eleventy.before", ({runMode}) => { | ||
let text = "Excluding"; | ||
// Only show drafts in serve/watch modes | ||
if(runMode === "serve" || runMode === "watch") { | ||
process.env.BUILD_DRAFTS = true; | ||
text = "Including"; | ||
} | ||
|
||
// Only log once. | ||
if(!logged) { | ||
console.log( `[11ty/eleventy-base-blog] ${text} drafts.` ); | ||
} | ||
|
||
logged = true; | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const path = require("path"); | ||
const eleventyImage = require("@11ty/eleventy-img"); | ||
|
||
module.exports = eleventyConfig => { | ||
function relativeToInputPath(inputPath, relativeFilePath) { | ||
let split = inputPath.split("/"); | ||
split.pop(); | ||
|
||
return path.resolve(split.join(path.sep), relativeFilePath); | ||
} | ||
|
||
// Eleventy Image shortcode | ||
// https://www.11ty.dev/docs/plugins/image/ | ||
eleventyConfig.addAsyncShortcode("image", async function imageShortcode(src, alt, widths, sizes) { | ||
// Full list of formats here: https://www.11ty.dev/docs/plugins/image/#output-formats | ||
// Warning: Avif can be resource-intensive so take care! | ||
let formats = ["avif", "webp", "auto"]; | ||
let file = relativeToInputPath(this.page.inputPath, src); | ||
let metadata = await eleventyImage(file, { | ||
widths: widths || ["auto"], | ||
formats, | ||
outputDir: path.join(eleventyConfig.dir.output, "img"), // Advanced usage note: `eleventyConfig.dir` works here because we’re using addPlugin. | ||
}); | ||
|
||
// TODO loading=eager and fetchpriority=high | ||
let imageAttributes = { | ||
alt, | ||
sizes, | ||
loading: "lazy", | ||
decoding: "async", | ||
}; | ||
return eleventyImage.generateHTML(metadata, imageAttributes); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const pluginRSS = require('@11ty/eleventy-plugin-rss'); | ||
const pluginSyntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight'); | ||
const pluginBundle = require('@11ty/eleventy-plugin-bundle'); | ||
const pluginNavigation = require('@11ty/eleventy-navigation'); | ||
|
||
const { EleventyHtmlBasePlugin } = require('@11ty/eleventy'); | ||
|
||
const pluginDrafts = require('./drafts.plugin'); | ||
const pluginImages = require('./images.plugin'); | ||
|
||
exports.install = (eleventyConfig) => { | ||
// App plugins | ||
eleventyConfig.addPlugin(pluginDrafts); | ||
eleventyConfig.addPlugin(pluginImages); | ||
|
||
// Official plugins | ||
eleventyConfig.addPlugin(pluginRSS); | ||
eleventyConfig.addPlugin(pluginSyntaxHighlight, { | ||
preAttributes: { tabindex: 0 } | ||
}); | ||
eleventyConfig.addPlugin(pluginNavigation); | ||
eleventyConfig.addPlugin(EleventyHtmlBasePlugin); | ||
console.log('hello'); | ||
eleventyConfig.addPlugin(pluginBundle); | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
permalink: /about/ | ||
layout: layouts/page.njk | ||
title: About | ||
eleventyNavigation: | ||
key: about | ||
--- | ||
|
||
Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment. | ||
|
||
## Code | ||
|
||
### Styled (with Syntax) | ||
|
||
Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring. | ||
|
||
```js | ||
// this is a command | ||
function myCommand() { | ||
let counter = 0; | ||
counter++; | ||
} | ||
|
||
// Test with a line break above this line. | ||
console.log('Test'); | ||
``` | ||
|
||
### Unstyled | ||
|
||
Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring. | ||
|
||
``` | ||
// this is a command | ||
function myCommand() { | ||
let counter = 0; | ||
counter++; | ||
} | ||
// Test with a line break above this line. | ||
console.log('Test'); | ||
``` | ||
|
||
## Section Header | ||
|
||
Capitalize on low hanging fruit to identify a ballpark value added activity to beta test. Override the digital divide with additional clickthroughs from DevOps. Nanotechnology immersion along the information highway will close the loop on focusing solely on the bottom line. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
// layout: 'layouts/page.njk' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
eleventyExcludeFromCollections: true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
# Metadata comes from _data/metadata.js | ||
permalink: /feed/feed.xml | ||
--- | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="{{ metadata.language }}"> | ||
<title>{{ metadata.title }}</title> | ||
<subtitle>{{ metadata.description }}</subtitle> | ||
<link href="{{ permalink | htmlBaseUrl(metadata.url) }}" rel="self"/> | ||
<link href="{{ metadata.url | addPathPrefixToFullUrl }}"/> | ||
<updated>{{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }}</updated> | ||
<id>{{ metadata.url }}</id> | ||
<author> | ||
<name>{{ metadata.author.name }}</name> | ||
<email>{{ metadata.author.email }}</email> | ||
</author> | ||
{%- for post in collections.posts | reverse %} | ||
{% set absolutePostUrl %}{{ post.url | htmlBaseUrl(metadata.url) }}{% endset %} | ||
<entry> | ||
<title>{{ post.data.title }}</title> | ||
<link href="{{ absolutePostUrl }}"/> | ||
<updated>{{ post.date | dateToRfc3339 }}</updated> | ||
<id>{{ absolutePostUrl }}</id> | ||
<content type="html">{{ post.templateContent | transformWithHtmlBase(absolutePostUrl, post.url) }}</content> | ||
</entry> | ||
{%- endfor %} | ||
</feed> |
Oops, something went wrong.