Jiayin Cao
@jiayincao.bsky.social
140 followers 49 following 10 posts
Senior Devtech @Nvidia. Former graphics engineer at Ready At Dawn, Naughty Dog, Ubisoft. Views are my own.
Posts Media Videos Starter Packs
jiayincao.bsky.social
Totally enjoying it!
jiayincao.bsky.social
It work within my repo. It may need some adjustment to work on other theme, I'm not quite sure though.
jiayincao.bsky.social
Hi @mjp123.bsky.social

I thought this is something you may want to make it easier for you to write post in the future, 😀.

This is a lot of talk to chatgpt to make it happen, 😅
jiayincao.bsky.social
- Reference to a same item will result to the same link.
- The reference text will be a link on post, which links to the line of the corresponding reference item.
- Reference link supports both external link and other internal hugo post link.

[tbc]
jiayincao.bsky.social
Here are the features it supports.
- References with actual reference first will show earlier in the reference list
- References without actual references will show after those are actually refered in the order they are defined.
- Failing to find the tag will produce obvous error on page

[tbc]
jiayincao.bsky.social
- Reference to an item with a short code by using their tag, rather than hard coding it with numbers and links.
- At the end of the article, simply do `{{< refshow >}}` to show all the references articles.

[tbc]
jiayincao.bsky.social
So I build a tool that allows us to define references in a painless way in the future.

Here is how it works.
- Define references at the beginning, rather than at the end. Defining != showing.
- For each item, we only need tag, title and link/page. Page is for reference to other post of yours.
[tbc]
jiayincao.bsky.social
A nice hugo blog post tool that I built today

Sometimes, when we work on a post with a bunch of references, we may need to remove or add items in between.
When the article is almost done, adding/removing any of the references requires updating a bunch of hardcoded numbers, which is error prone