add an index page and add name functions to the API and cache busting #7

Merged
mossfet merged 7 commits from index-page into main 2023-07-11 11:08:08 +00:00
Member

i actually made the API work as intended by adding name functions to the API and i added an index page which just loops over the sites in the names.json file and links to them and the text will be the name of the site if it has a name, and if it doesn't, it will be the URL of the site.

i also added cache busting filenames which are filenames with a unique hash added onto them which means you can set a long time for the cache to stay valid and you can invalidate that by just changing the file as the file has a unique name based off its hash.

i actually made the API work as intended by adding name functions to the API and i added an index page which just loops over the sites in the names.json file and links to them and the text will be the name of the site if it has a name, and if it doesn't, it will be the URL of the site. i also added cache busting filenames which are filenames with a unique hash added onto them which means you can set a long time for the cache to stay valid and you can invalidate that by just changing the file as the file has a unique name based off its hash.
Fries added 4 commits 2023-07-10 06:30:43 +00:00
looks like i used the previous_name logic for element of the vector i
used which is wrong.
the stylesheet got a new update from my websites stylesheet with the
bigger font sizes and i split the hyperlegible font face css into its
own file and made the asset code cleaner.
Fries added 1 commit 2023-07-10 06:32:06 +00:00
Fries added 1 commit 2023-07-11 08:06:02 +00:00
i abstraced the file handling out to a global static struct called
"Files" that is only written to once, in main inside a OnceLock. i also
split out asset handling into its own module folder called assets which
has all the asset handling code.

i also have a new crate called "proc_macros" which provides a attribute macro
that adds the base_template field to each struct i decorate with it
using the syn and quote crates.
Fries changed title from add an index page and add name functions to the API to add an index page and add name functions to the API and cache busting 2023-07-11 08:07:29 +00:00
Fries added 1 commit 2023-07-11 09:38:58 +00:00
this adds a Cache-Control header to existing responses so they can be
cached in the browser. cache busting means this cache can be immutable
as if the file changes, the filename changes, so the browser will get
new files.
mossfet merged commit 50d92e998a into main 2023-07-11 11:08:08 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Solarpunk/meowy-webring#7
No description provided.