serhii.net

In the middle of the desert you can say anything you want

18 Jun 2024

Quarto publications page and adding anchors

Given: quarto website page with publications. Previously touched upon in the messy 240605-2055 Quarto website creation notes.

This works:

[UNLP paper](publications.qmd#hamotskyi2024unlp)

Anchor targets

Template

// Get anchor id somehow from paper path
<% let y= item.path.split('/'); y.pop(); let dirname = y.pop(); let citation_key = dirname.split('-').pop() %>

// Overwrite with paper front-matter if there's one
<% if (item.citation_key) { %> 
	<% citation_key = item.citation_key %>
<% } %>       

// Add to paper listing thing 
<a id="<%= citation_key %>"></a>
Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus