Skip to content

Commit

Permalink
Tidy up config
Browse files Browse the repository at this point in the history
  • Loading branch information
LkeMitchll committed Mar 24, 2024
1 parent 7020dd2 commit 82f2c3c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions eleventy.config.js
Expand Up @@ -19,9 +19,7 @@ const config = (eleventy) => {
// Custom shortcodes
eleventy.addAsyncShortcode('image', responsiveImage);

eleventy.addCollection('postsWithoutNotes', (collectionAPI) => collectionAPI.getFilteredByTag('post').filter((item) => item.data.type !== 'Note'));
eleventy.addCollection('notes', (collectionAPI) => collectionAPI.getFilteredByTag('post').filter((item) => item.data.type === 'Note'));

// Markdown config
const mdOptions = { html: true, typographer: true };
const md = markdownIt(mdOptions).use(mdAnchor);

Expand All @@ -30,9 +28,7 @@ const config = (eleventy) => {
eleventy.addPairedShortcode('sidenote', (content, number) => {
const result = md.render(content);
return `<aside id="sn-${number}" class="sidenote">
<small>
${result}
</small>
<small>${result}</small>
</aside>`;
});

Expand Down

0 comments on commit 82f2c3c

Please sign in to comment.