Skip to content

add austinhuang.me#10

Merged
mocha merged 1 commit intomocha:mainfrom
austinhuang0131:patch-1
Jan 29, 2026
Merged

add austinhuang.me#10
mocha merged 1 commit intomocha:mainfrom
austinhuang0131:patch-1

Conversation

@austinhuang0131
Copy link
Copy Markdown
Contributor

@austinhuang0131 austinhuang0131 commented Sep 19, 2025

Do you have a purely non-JS widget? (Since it's Next.js I suppose one could be added if your subscription allows hosting dynamic API endpoints)

@eclecticpassions
Copy link
Copy Markdown
Contributor

eclecticpassions commented Nov 22, 2025

I'm also trying to figure out a non-js way to add this webring to my site... Somehow fetch the data from https://webring.fun/data/all.json.
Edit: I think I got something working—I'm using Hugo and used {{- $remote := resources.GetRemote "https://webring.fun/data/all.json" -}} to fetch the JSON data. And then a small snippet of JS to load a different random link instead of a fixed one only on site build: <script> document.addEventListener('DOMContentLoaded', () => { const a = document.querySelector('.webring-random'); if (!a) return; let urls; try { urls = JSON.parse(a.dataset.sites || '[]'); } catch(e) { return; } if (urls.length) a.href = urls[Math.floor(Math.random() * urls.length)]; }); </script>

@mocha mocha merged commit 48b3e5d into mocha:main Jan 29, 2026
@austinhuang0131 austinhuang0131 deleted the patch-1 branch April 11, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants