Anchor link in a YAML file (Jekyll)

تبليغ
سؤال

يرجى شرح بإيجاز لمإذا تشعر أنك ينبغي الإبلاغ عن هذا السؤال.

تبليغ
‎إلغاء

How can I define an anchor link through a YAML file? I would like to add a link that scrolls to the top of the sidebar (<aside> element) from any category.

So, for example, if I’m in the HTML category, this link should get the current URL and add the anchor /#aside. If I’m in the CSS category, the same. The resulting URL should be /html/#aside or /css/#aside…

This is my code:

– title: HTML
url: /html/

– title: CSS
url: /css/

– title: Index
url: */#aside

I already have an element with the ID id=”aside” in the site. And of course, this “Index” link is not working at all.

Is this even possible? (Without JavaScript)

‫أضف إجابة

تصفح
تصفح

مجهول يجيب