Giter Club home page Giter Club logo

<title> for tags pages is missing about eleventy-base-blog HOT 5 CLOSED

11ty avatar 11ty commented on June 11, 2024
for tags pages is missing<p>from eleventy-base-blog.</p></section> </section> </article> <article> <h2 class="h2">Comments (5)</h2> <section class="issue-comment"> <section id="589798575" class="issue-head"> <img class="issue-avatar" src="https://avatars.githubusercontent.com/u/39355?s=30&v=4" alt="zachleat avatar" /> <a class="issue-username" href="/zachleat">zachleat</a> <span class="issue-time"> commented on June 11, 2024 </span> <span class="issue-vote"> <i class="icon-vote"></i>7 </span> </section> <section class="markdown markdown-js p-5"><p dir="auto">Watch for <code class="notranslate">eleventyComputed</code> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="430211455" data-permission-text="Title is private" data-url="https://github.com/11ty/eleventy/issues/481" data-hovercard-type="issue" data-hovercard-url="/11ty/eleventy/issues/481/hovercard" href="https://github.com/11ty/eleventy/issues/481">11ty/eleventy#481</a> to drop soon in 0.11.0 that will solve all these problems in a much better way.</p> <p dir="auto">e.g.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--- pagination: data: collections size: 1 alias: tag layout: layouts/home.njk eleventyComputed: title: Tagged “{{ tag }}” permalink: "/tags/{{ tag }}/" ---"><pre class="notranslate"><code class="notranslate">--- pagination: data: collections size: 1 alias: tag layout: layouts/home.njk eleventyComputed: title: Tagged “{{ tag }}” permalink: "/tags/{{ tag }}/" --- </code></pre></div> <p dir="auto">and</p> <p dir="auto"><code class="notranslate"><title>{{ title or metadata.title }}</title></code></p><p>from eleventy-base-blog.</p></section> </section> <section class="issue-comment"> <section id="420673410" class="issue-head"> <img class="issue-avatar" src="https://avatars.githubusercontent.com/u/81942?v=4" alt="mathiasbynens avatar" /> <a class="issue-username" href="/mathiasbynens">mathiasbynens</a> <span class="issue-time"> commented on June 11, 2024 </span> <span class="issue-vote"> <i class="icon-vote"></i>1 </span> </section> <section class="markdown markdown-js p-5"><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="title: {{ tag }}"><pre class="notranslate"><code class="notranslate">title: {{ tag }} </code></pre></div> <p dir="auto">...strangely results in <code class="notranslate">[object Object]</code>, despite <code class="notranslate">{{ tag }}</code> showing up as the tag text in the body text, and <code class="notranslate">{{ tag }}</code> expanding as expected in the <code class="notranslate">permalink:</code> frontmatter. Any idea what's up?</p><p>from eleventy-base-blog.</p></section> </section> <section class="issue-comment"> <section id="420866273" class="issue-head"> <img class="issue-avatar" src="https://avatars.githubusercontent.com/u/39355?s=30&v=4" alt="zachleat avatar" /> <a class="issue-username" href="/zachleat">zachleat</a> <span class="issue-time"> commented on June 11, 2024 </span> </section> <section class="markdown markdown-js p-5"><p dir="auto">Hmm… I suppose it is a bit unexpected that <code class="notranslate">title: {{ tag }}</code> would not render there. <code class="notranslate">permalink</code> is one of the only front matter keys that does render in the local template engine.</p> <p dir="auto">I suppose, technically Eleventy could loop through each front matter variable and attempt to render each value individually. But we’d need to create a dependency graph of front matter variables there, to ensure we rendered in the correct order. That being said, we don’t do any of this right now.</p> <p dir="auto">We only render <code class="notranslate">permalink</code> and I think one other undocumented case. We do expose a <code class="notranslate">renderData</code> object in front matter that does render the content inside of it. It was undocumented because I wasn’t really happy about it.</p> <p dir="auto">For example, if the <code class="notranslate">tags.njk</code> template had this front matter:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--- pagination: data: collections size: 1 alias: tag layout: layouts/home.njk renderData: title: Tagged “{{ tag }}” permalink: /tags/{{ tag }}/ ---"><pre class="notranslate"><code class="notranslate">--- pagination: data: collections size: 1 alias: tag layout: layouts/home.njk renderData: title: Tagged “{{ tag }}” permalink: /tags/{{ tag }}/ --- </code></pre></div> <p dir="auto">and the layout title were changed to:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<title>{{ renderData.title or title or metadata.title }}</title>"><pre class="notranslate"><code class="notranslate"><title>{{ renderData.title or title or metadata.title }}</title> </code></pre></div> <p dir="auto">This works as expected. I will make that change but this will cement renderData forever and now I’m a little sad 😇</p> <p dir="auto">I am open to more complicated-behind-the-curtain solutions here, if you have suggestions!</p><p>from eleventy-base-blog.</p></section> </section> <section class="issue-comment"> <section id="420866479" class="issue-head"> <img class="issue-avatar" src="https://avatars.githubusercontent.com/u/39355?s=30&v=4" alt="zachleat avatar" /> <a class="issue-username" href="/zachleat">zachleat</a> <span class="issue-time"> commented on June 11, 2024 </span> </section> <section class="markdown markdown-js p-5"><p dir="auto">I think the reason I’m not real happy about <code class="notranslate">renderData</code> is that I’m not even sure if you can use it inside of <code class="notranslate">permalink</code> or vice versa. You get into weird cases where order matters.</p><p>from eleventy-base-blog.</p></section> </section> <section class="issue-comment"> <section id="425286966" class="issue-head"> <img class="issue-avatar" src="https://avatars.githubusercontent.com/u/81942?v=4" alt="mathiasbynens avatar" /> <a class="issue-username" href="/mathiasbynens">mathiasbynens</a> <span class="issue-time"> commented on June 11, 2024 </span> </section> <section class="markdown markdown-js p-5"><p dir="auto">This is now resolved. Thanks! I’m closing the issue.</p><p>from eleventy-base-blog.</p></section> </section> </article> <section> <h2 class="h2">Related Issues (20)</h2> <div class="issue"> <ul> <li> <a href="/11ty/eleventy-base-blog/issues/141">_data/eleventy.json? or eleventy.js?</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/11ty/eleventy-base-blog/issues/142">Dynamic content inside {% image %} shortcode?</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 2</span> </li> <li> <a href="/11ty/eleventy-base-blog/issues/143">Auto posting to social media</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 3</span> </li> <li> <a href="/11ty/eleventy-base-blog/issues/144">Eleventy-img plugin causing build error?</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/11ty/eleventy-base-blog/issues/145">Simplify getAllTags filter?</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 3</span> </li> <li> <a href="/11ty/eleventy-base-blog/issues/148">Questions regarding eleventy-img config</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 3</span> </li> <li> <a href="/11ty/eleventy-base-blog/issues/149">PrismJS error</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 2</span> </li> <li> <a href="/11ty/eleventy-base-blog/issues/150">Unclear how to configure to be compatible with CSP directive `style-src 'self'`</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/11ty/eleventy-base-blog/issues/156">Draft tags show up in tag pagination even when excluding drafts</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/11ty/eleventy-base-blog/issues/159">How to put RSS feed at /feed ?</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 3</span> </li> <li> <a href="/11ty/eleventy-base-blog/issues/162">How to transform tags to lowercase and sort alphabetically?</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/11ty/eleventy-base-blog/issues/163">Support for animated gifs?</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 3</span> </li> <li> <a href="/11ty/eleventy-base-blog/issues/164">Generating a new blog post?</a> </li> <li> <a href="/11ty/eleventy-base-blog/issues/167">Footnote support</a> </li> <li> <a href="/11ty/eleventy-base-blog/issues/169">Error reported when tag is in Chinese</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 4</span> </li> <li> <a href="/11ty/eleventy-base-blog/issues/170">How can I show the 10 latest posts instead of 3 in the home page?</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 2</span> </li> <li> <a href="/11ty/eleventy-base-blog/issues/171">.editorconfig's use of tabs instead of spaces causes eleventyNavigation to fail</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 4</span> </li> <li> <a href="/11ty/eleventy-base-blog/issues/172">why are the tags title case</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/11ty/eleventy-base-blog/issues/173">Should be clear that permalink and excludeFromCollections are at the mercy of downstream logic</a> </li> <li> <a href="/11ty/eleventy-base-blog/issues/175">Inconsistency between documentation and implementation for "draft" feature</a> </li> </ul> </div> </section> </main> <section id="more" class="flex-none w-full md:w-60 text-gray-600 bg-gray-50 px-5 md:px-3 rounded-md dark-color"> <div class="w-full md:w-60 h-0.5"></div> <section> <!-- recommend projects --> <h2 class="h2 py-3.5">Recommend Projects</h2> <ul> <li class="mb-4"> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/facebook/react"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://raw.githubusercontent.com/facebook/create-react-app/master/packages/cra-template/template/public/logo192.png" alt="React photo" /> React </a> </h3> <p class="article-more pt-1">A declarative, efficient, and flexible JavaScript library for building user interfaces.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/vuejs/vue"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://camo.githubusercontent.com/c8f91d18976e27123643a926a2588b8d931a0292fd0b6532c3155379e8591629/68747470733a2f2f7675656a732e6f72672f696d616765732f6c6f676f2e706e67" alt="Vue.js photo" /> Vue.js </a> </h3> <p class="article-more pt-1">🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/microsoft/TypeScript"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://www.typescriptlang.org/favicon-32x32.png" alt="Typescript photo" /> Typescript </a> </h3> <p class="article-more pt-1">TypeScript is a superset of JavaScript that compiles to clean JavaScript output.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/tensorflow/tensorflow"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://camo.githubusercontent.com/c04e16c05de80dadbdc990884672fc941fdcbbfbb02b31dd48c248d010861426/68747470733a2f2f7777772e74656e736f72666c6f772e6f72672f696d616765732f74665f6c6f676f5f736f6369616c2e706e67" alt="TensorFlow photo" /> TensorFlow </a> </h3> <p class="article-more pt-1">An Open Source Machine Learning Framework for Everyone</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/django/django"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars2.githubusercontent.com/u/27804?s=200&v=4" alt="Django photo" /> Django </a> </h3> <p class="article-more pt-1">The Web framework for perfectionists with deadlines.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/laravel/laravel"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://laravel.com/img/logomark.min.svg" alt="Laravel photo" /> Laravel </a> </h3> <p class="article-more pt-1">A PHP framework for web artisans</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/d3/d3"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://camo.githubusercontent.com/586ccf0aad9684edc821658cee04146cf36d1f1d5ec904bbefd72728909ccb2e/68747470733a2f2f64336a732e6f72672f6c6f676f2e737667" alt="D3 photo" /> D3 </a> </h3> <p class="article-more pt-1">Bring data to life with SVG, Canvas and HTML. 📊📈🎉</p> </article> </li> <li> <div> </div> </li> </ul> </section> <section> <!-- recommend topics --> <h2 class="h2 py-3.5">Recommend Topics</h2> <ul> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/javascript"> javascript </a> </h3> <p class="article-more pt-1">JavaScript (JS) is a lightweight interpreted programming language with first-class functions.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/web"> web </a> </h3> <p class="article-more pt-1">Some thing interesting about web. New door for the world.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/server"> server </a> </h3> <p class="article-more pt-1">A server is a program made to process requests and deliver data to clients.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/machine-learning"> Machine learning </a> </h3> <p class="article-more pt-1">Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/visualization"> Visualization </a> </h3> <p class="article-more pt-1">Some thing interesting about visualization, use data art</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/game"> Game </a> </h3> <p class="article-more pt-1">Some thing interesting about game, make everyone happy.</p> </article> </li> <li> </li> </ul> </section> <section> <!-- recommend users --> <h2 class="h2 py-3.5">Recommend Org</h2> <ul> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/facebook"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/69631?v=4" alt="Facebook photo" /> Facebook </a> </h3> <p class="article-more pt-1">We are working to build community through open source technology. NB: members must have two-factor auth.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/microsoft"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/6154722?v=4" alt="Microsoft photo" /> Microsoft </a> </h3> <p class="article-more pt-1">Open source projects and samples from Microsoft.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/google"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/1342004?v=4" alt="Google photo" /> Google </a> </h3> <p class="article-more pt-1">Google ❤️ Open Source for everyone.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/alibaba"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/1961952?v=4" alt="Alibaba photo" /> Alibaba </a> </h3> <p class="article-more pt-1">Alibaba Open Source for everyone</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/d3"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/1562726?v=4" alt="D3 photo" /> D3 </a> </h3> <p class="article-more pt-1">Data-Driven Documents codes.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/tencent"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/18461506?v=4" alt="Tencent photo" /> Tencent </a> </h3> <p class="article-more pt-1">China tencent open source team.</p> </article> </li> <li> </li> </ul> </section> </section> </div> </div> <!-- footer --> <footer class="sizeing text-xs text-center p-5"> <div>Friends: <a class="hover:underline" target="_blank" href="https://www.chanpinqingbaoju.com">ProductDiscover</a> </div> Copyright © 2024 Giter Club <!-- & <span class="block md:inline">Data Power by github.com</span> --> ❤️ <a class="hover:underline block md:inline" href="mailto:cs.victor.edison@gmail.com">Mail to me</a> </footer> </body> </html>