halostatue

halostatue

Over the last several months, I’ve been using Tableau to rebuild my long-neglected website. Tableau is part of the Elixir Tools project headed by @mhanberg, and is built on top of MDEx by @leandrocp. This library is one of ten libraries and Elixir extensions that I built. Most of these were built with the assistance of Kiro.

TableauRefLinkExtension is a Tableau extension that resolves “reference links” to pages, posts, and static assets without to know the precise URL of the referenced comments. This works with elements supporting the href or src attributes.

  • Links: <a>, <link>
  • Media: <img>, <audio>, <video>, <source>, <track>
  • Embedded: <embed>, <iframe>, <script>

A reference link in this context is a partial link ($ref:<content-file> or $site:<path>) that is resolved against the content of the site with the configured base URL. I use this in my site for referencing my licence page ($ref:licence.md) so that if I move it from /licence to /about/licence it will be resolved correctly without having to find and resolve all locations.

Content Link Resolution ($ref:<content>)

Links with $ref:<content> resolve to content files (pages, posts) or static assets.

[My Post]($ref:_posts/2024-01-15-my-post.md)
[About Page]($ref:_pages/about.md)
![Logo]($ref:logo.png)
[With Anchor]($ref:post.md#section)
<a href="/posts/2024/01/15/my-post">My Post</a>
<a href="/about">About Page</a>
<img src="/logo.png" alt="Logo">
<a href="/posts/post#section">With Anchor</a>

If the content reference is just the filename (no /), files are searched across all content and static assets.

[My Post]($ref:my-post.md)

If the content reference is a path (contains /), the file paths are matched from the workspace root.

[Specific Post]($ref:_posts/2024-01-15-my-post.md) [Asset]($ref:images/logo.png)

$ref links are resolved from content before static assets. Missing references ($ref:no-file.md) become #ref-not-found:path with a logged warning. Ambiguous matches ($ref:one.md) use the first match with a logged warning.

Site Link Resolution ($site:<path>)

Links with $site:<path> resolve to files relative to the site base URL.

[Download PDF]($site:downloads/guide.pdf)
[Secret File]($site:secret/file.txt)
<a href="/base/downloads/guide.pdf">Download PDF</a>
<a href="/base/secret/file.txt">Secret File</a>

No content lookup or validation is performed.

https://github.com/halostatue/tableau_ref_link_extension

Where Next? Top

Trending in Announcing Top

mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
gtcode
Aloha gang, There’s a new class of AI model out from TypeSafe. Jev is their flagship model. You can learn about it here: ...
New
quatermain
Hello, I’m sharing my plugin here in forum after some time so it has time to mature and proof yourself. I use Claude Code daily on a pr...
New
LostKobrakai
I’ve recently created a small library phoenix_vite integrating the vite build tooling with phoenix. It provides an igniter.installer t...
New
danschultzer
I needed something like premailer for rails, and after searching, I decided to make an easy-to-use library to handle inline styles and co...
New
kraleppa
If you’ve ever had to debug a BEAM node you know it can be a painful process. Parsing raw data, or dealing with clutter often gets in the...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
raa-ziq
Hi everyone :waving_hand: I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
AstonJ
AI tools and services seem to be the new JS framework - with new ones popping up every 5 minutes - hence it might be worth posting one of...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews