Skip to content

feat: expose sites.json as a url - #6

Open
michal-skraburski wants to merge 2 commits into
r-webdev:mainfrom
michal-skraburski:main
Open

michal-skraburski wants to merge 2 commits into
r-webdev:mainfrom
michal-skraburski:main

Conversation

@michal-skraburski

Copy link
Copy Markdown
Contributor

As per our discussion, this feature allows a participant of the webring to fetch the sites.json dynamically and implement their own logic. This has the following benefits:

  • The file will be cached and reduces load on the webring parent.
  • The file reduces the time it takes to load the next webring child by allowing to bypass the parent and redirect to the next/prev child.

Unfortunately I was not able to put the sites.json in public/ as Vite was throwing an error saying it was not permitted/unideal to include a file served under public/ due to bundling. I didn't fully understand this, and proceeded to offer you this equally good alternative instead. This method is still fully static.

@wiktoriavh

wiktoriavh commented Sep 18, 2026

Copy link
Copy Markdown
Member

i wonder if if makes sense to add a small snippet to copy as well, which already has the logic written on how to work with the sites json file. so all you would really have to do it copy the code.

<script>
// the logic...
</script>
<nav id="webring"> <!-- the html --> </nav>

@michal-skraburski

Copy link
Copy Markdown
Contributor Author

I'll implement a little snippet to do that, no worries!

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.

2 participants