Skip to content

Commit

Permalink
Change input folder to src
Browse files Browse the repository at this point in the history
  • Loading branch information
LkeMitchll committed Jan 11, 2022
1 parent 2071133 commit 522a197
Show file tree
Hide file tree
Showing 91 changed files with 37 additions and 33 deletions.
26 changes: 15 additions & 11 deletions .eleventy.js
Expand Up @@ -2,11 +2,11 @@ require("dotenv").config();

const pluginRSS = require("@11ty/eleventy-plugin-rss");
const pluginReadingTime = require("eleventy-plugin-reading-time");
const findByID = require("./filters/findByID");
const limit = require("./filters/limit");
const date = require("./filters/date");
const markdown = require("./shortcodes/markdown");
const responsiveImage = require("./shortcodes/responsiveImage");
const findByID = require("./src/filters/findByID");
const limit = require("./src/filters/limit");
const date = require("./src/filters/date");
const markdown = require("./src/shortcodes/markdown");
const responsiveImage = require("./src/shortcodes/responsiveImage");
const postcss = require("postcss");
const importPlugin = require("postcss-import");
const autoprefixerPlugin = require("autoprefixer");
Expand All @@ -16,10 +16,10 @@ module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(pluginRSS);
eleventyConfig.addPlugin(pluginReadingTime);

eleventyConfig.addPassthroughCopy("./assets/fonts");
eleventyConfig.addPassthroughCopy("./assets/images");
eleventyConfig.addPassthroughCopy("./components/*.js");
eleventyConfig.addWatchTarget("./css/");
eleventyConfig.addPassthroughCopy("src/assets/fonts");
eleventyConfig.addPassthroughCopy("src/assets/images");
eleventyConfig.addPassthroughCopy("src/components/*.js");
eleventyConfig.addWatchTarget("src/css/");

eleventyConfig.addFilter("findByID", findByID);
eleventyConfig.addFilter("limit", limit);
Expand All @@ -28,12 +28,14 @@ module.exports = function (eleventyConfig) {
eleventyConfig.addShortcode("renderMarkdown", markdown);
eleventyConfig.addShortcode("responsiveImage", responsiveImage);

// PostCSS comile via .pcss file extension
eleventyConfig.addTemplateFormats("pcss");
eleventyConfig.addExtension("pcss", {
outputFileExtension: "css",

compile: async function (inputContent, inputPath) {
let result = await postcss([importPlugin, autoprefixerPlugin, nanoPlugin])
let plugins = [importPlugin, autoprefixerPlugin, nanoPlugin];
let result = await postcss(plugins)
.process(inputContent, { from: inputPath })
.then((result) => result.css);

Expand All @@ -44,7 +46,9 @@ module.exports = function (eleventyConfig) {
});

return {
dir: {
input: "src",
},
htmlTemplateEngine: "njk",
markdownTemplateEngine: "njk",
};
};
2 changes: 1 addition & 1 deletion netlify/functions/now-playing.js
@@ -1,4 +1,4 @@
const SpotifyAPI = require("../../providers/spotify");
const SpotifyAPI = require("../../src/providers/spotify");

exports.handler = async () => {
const api = new SpotifyAPI();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions _includes/layout.html → src/_includes/layout.html
Expand Up @@ -29,10 +29,10 @@
<link rel="stylesheet" href="/css/style.css" />
</head>
<body>
{% include "_includes/nav.html" %}
{% include "./nav.html" %}
<main>
{{ content | safe }}
</main>
{% include "_includes/footer.html" %}
{% include "./footer.html" %}
</body>
</html>
2 changes: 1 addition & 1 deletion _includes/listening.html → src/_includes/listening.html
Expand Up @@ -3,7 +3,7 @@ <h2>Listening</h2>
<section class="columns" style="--cols: 3">
<div>
<h3 class="subtitle">Now Playing</h3>
{% include "components/now-playing.html" %}
{% include "../components/now-playing.html" %}
<hr class="gap-large" />
{% for week in [music.lastWeek, music.thisWeek] %}
<h3 class="subtitle">{{ week.title }}</h3>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions about.html → src/about.html
Expand Up @@ -3,7 +3,7 @@
title: About Me
theme: pink
---
{% from '_includes/metaLink.html' import metaLink %}
{% from './_includes/metaLink.html' import metaLink %}
{% set heroImage = assets | findByID("5ZI6Cx1N7O5KG8ikkg1wv7") %}
{% set content = pages | findByID("gs1BugZQXA8mN7DniEOFx") %}
<header class="flow | gap-large">
Expand All @@ -28,8 +28,8 @@ <h1 class="headline">{{ content.fields.title }}</h1>
</p>
</article>
{% set toc = ["History", "Experience", "Clients", "Skills", "Recognition"] %}
{% include "_includes/toc.html" %}
{% include "./_includes/toc.html" %}
<article class="markdown | flow | gap-large">
{% renderMarkdown content.fields.contentMarkdown, assets %}
</article>
{% include "_includes/career.html" %}
{% include "./_includes/career.html" %}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
4 changes: 2 additions & 2 deletions bookmarks.html → src/bookmarks.html
Expand Up @@ -8,7 +8,7 @@
alias: year
permalink: "bookmarks/{% if pagination.pageNumber > 0 %}{{ year.title | lower }}/{% endif %}index.html"
---
{% from '_includes/metaLink.html' import metaLink %}
{% from "./_includes/metaLink.html" import metaLink %}
{% set content = pages | findByID("4bctuwqdqxtWxfaNXPLqaI") %}
{% set lastUpdate = bookmarks[0].bookmarks | limit(1) %}
{% set roundup = roundups | limit(1) %}
Expand All @@ -32,7 +32,7 @@ <h1 class="headline">
<h2 class="gap-small">Favourites &mdash; <em>{{ roundup.fields.title }}</em></h2>
<section>
{% set favouriteBookmarks = roundup.fields.links %}
{% include "_includes/favouriteBookmarks.html" %}
{% include "./_includes/favouriteBookmarks.html" %}
</section>
<hr>
</article>
Expand Down
4 changes: 2 additions & 2 deletions colophon.html → src/colophon.html
Expand Up @@ -16,8 +16,8 @@ <h1 class="headline">{{ content.fields.title }}</h1>
<div id="updates" class="gap-large">
<h2>Updates</h2>
{% set postParent = '/colophon' %}
{% include "_includes/posts.html" %}
{% include "_includes/commits.html" %}
{% include "./_includes/posts.html" %}
{% include "./_includes/commits.html" %}
<hr />
</div>
<section id="notes" class="markdown | flow">
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions index.html → src/index.html
Expand Up @@ -10,20 +10,20 @@ <h1 class="headline">Welcome</h1>
{% renderMarkdown content.fields.descriptionMarkdown %}
</div>
<div class="measure">
{% include "_includes/siteDirectory.html" %}
{% include "./_includes/siteDirectory.html" %}
</div>
</header>
<article class="columns gap-xx-large" style="--cols:2">
<section class="flow | gap-x-large">
<h2 class="title">Recent Posts</h2>
{% include "_includes/posts.html" %}
{% include "./_includes/posts.html" %}
<a href="/journal" class="link">See all Posts</a>
</section>
<section class="flow">
<h2 class="title">Recent Bookmarks</h2>
{% set timePeriod = bookmarks[0] %}
{% set bookmarks = timePeriod.bookmarks | limit(3) %}
{% include "_includes/bookmarks.html" %}
{% include "./_includes/bookmarks.html" %}
<a href="/bookmarks/2021" class="link">See all Bookmarks</a>
</section>
</article>
12 changes: 6 additions & 6 deletions journal.html → src/journal.html
Expand Up @@ -3,7 +3,7 @@
title: Journal
theme: yellow
---
{% from "_includes/metaLink.html" import metaLink %}
{% from "./_includes/metaLink.html" import metaLink %}
{% set content = pages | findByID("5sXnSwGVJePuWZpcOZvIML") %}
{% set toc = ["Now", "Posts", "Listening", "Reading", "Scrapbook"] %}
{% set scrapbook = savee | limit(50) %}
Expand All @@ -18,7 +18,7 @@ <h1>{{ content.fields.title }}</h1>
</ul>
<hr>
</header>
{% include "_includes/toc.html" %}
{% include "./_includes/toc.html" %}
<article id="now" class="flow | gap-xx-large">
<h2>Now</h2>
<section class="markdown | flow">
Expand All @@ -44,10 +44,10 @@ <h3 class="subtitle | inline">Current Clients</h3>
</article>
<article id="posts" class="flow | gap-xx-large">
<h2>Posts</h2>
{% include "_includes/posts.html" %}
{% include "./_includes/posts.html" %}
</article>
{% include "_includes/listening.html" %}
{% include "_includes/reading.html" %}
{% include "./_includes/listening.html" %}
{% include "./_includes/reading.html" %}
<article id="scrapbook" class="flow | gap-xx-large">
<header>
<h2>Scrapbook</h2>
Expand All @@ -65,5 +65,5 @@ <h2>Scrapbook</h2>
</small>
</p>
</header>
{% include "_includes/scrapbook.html" %}
{% include "./_includes/scrapbook.html" %}
</article>
2 changes: 1 addition & 1 deletion metaPosts.html → src/meta-posts.html
Expand Up @@ -6,7 +6,7 @@
permalink: "colophon/post/{{ post.fields.slug }}/"
layout: layout.html
---
{% from '_includes/stats.html' import stats %}
{% from "./_includes/stats.html" import stats %}
<header class="flow | gap-x-large">
<h1 class="headline | measure | gap-large">{{ post.fields.title }}</h1>
<div class="flow" style="--flow-space: var(--space-default)">
Expand Down
2 changes: 1 addition & 1 deletion posts.html → src/posts.html
Expand Up @@ -6,7 +6,7 @@
permalink: "post/{{ post.fields.slug }}/"
layout: layout.html
---
{% from '_includes/stats.html' import stats %}
{% from "./_includes/stats.html" import stats %}
<header class="flow | gap-x-large">
<h1 class="headline | measure | gap-large">{{ post.fields.title }}</h1>
<div class="flow" style="--flow-space: var(--space-default)">
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 522a197

Please sign in to comment.