Friday After Thanksgiving
Posted on
Tagged TIL : My First Real TIL
Today I learned ChatGPT can really, really help me to learn Eleventy and solve javascript errors without me even having a brain.
- I can add an external link to the nav bar above by creating an empty file in content and adding this code:
---js
const eleventyNavigation = {
key: "EastGroup",
url: "https://www.eastgroup.net/",
permalink: false,
order: 65
};
---
- Eleventy is really good at taking Markdown source code and having it styled as HTML code. Pico CSS hardly seems to noice.
- Eleventy generated this HTML to reverse the order of blog posts
<ul reversed class="postlist">
but you can't reverse an unordered list because it's not ordered!! W3 validation flagged it. ChatGPT gave me two solutions and I used this one:
<ul style="transform: rotate(360deg);" class="postlist">
This is the other solution:
<ul style="display: flex; flex-direction: column-reverse;">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
That worked, but only when I took the "reverse" attribute off the Nunjucks template. I left both examples up for now.
Validation at W3.org is failing because 11ty is using srcset attribute without a sizes attribute. I can't figure out why I don't find the answer to this when I search it up? Update: I found the answer and the code to correct wasn't onerous. I will try to find the source that fixed this for me and update here. Update #2: here's the solution: 2024-11-30bTIL