There are a number of things being discussed in various bugs/pull requests about how to solve several problems, and I’d like to see what the preference for some of the options are. Basically, we have three problems:
-
Cross-site document references. I can simulate this with my
xshortcode, but it would be better if there were a helper mechanism. Thexshortcode looks like{{% x ref="about" %}}and produces<a href="/about">About</a>if there is a page calledabout.md(or other template). I would rather be able to do[about me]({{ .RelRef "about" }})or[about me]({{ .Ref "about" }})and have it work with the content language I use rather than having to subvert it. -
In-document fragment references. This will be important because of the solution I’m going to propose for finally enabling automatically generating fragment references (e.g.,
#about-me) with Hugo and Markdown (using the blackfriday parser), because all heading IDs will be generated with the page unique ID appended (e.g.,#about-me-0123456789abcdef0123). Rather than having to remember to write this as[heading](#heading-{{ .UniqueId }}), I would rather reuse something like.Refor.RelRef(detect the use of a fragment and Do The Right Thing, such as[about me]({{ .RelRef 'about#current-job' }})or[heading]({{ .RelRef '#heading' }})). Failing that, a.Fragmenthelper that does this would be useful. (I prefer the idea of having.RelRefand.Refbe smart enough to handle this, as it means that you can also do cross-document fragment references correctly. -
Asset references. This one is a bit harder, but it has to do with cache busting. This could be done with
.Asset "path/to/file.css". This change would be a bit larger (as the copying of static assets would have to involve file renaming).
What do people think?
Let’s see if I can say something more than just +1 to everything.