Commit graph

15 commits

Author SHA1 Message Date
3fa6a24a5d Merge pull request 'fix json bugs and add a cli' (#2) from cli into json
Reviewed-on: #2

Looks good, cat
2023-07-01 18:24:54 +00:00
9411e4a097 add a remove command and error handling to the cli 2023-06-30 23:12:55 -07:00
c729d2115b add a add command to the cli
this command can add sites to the names.json file
2023-06-30 22:11:44 -07:00
c481999c55 add a work in progress cli and fix bugs
i'm making a cli that lets you add stuff to the names.json file and read
data from it and i moved stuff that can be shared between them like the
Site struct to a shared crate thats in workspace, like the cli crate. i
also switched to using typed json parsing which works well.
2023-06-30 21:43:18 -07:00
Mossfet
1667e14d64 Initial json parsing 2023-06-30 17:47:25 +01:00
Mossfet
c2fe292b2d Prepped code for names being defined at runtime in rocket() 2023-06-30 11:47:46 +01:00
7dc2d5350b disable the http/2 feature in rocket
nginx doesn't support proxying http/2 and this app is almost certainly
going to be put behind a reverse proxy. this also reduces the binary
size.
2023-06-29 22:34:15 -07:00
2227c870ff Merge pull request 'use the askama compile time template engine' (#1) from askama into main
Reviewed-on: #1
2023-06-30 04:30:28 +00:00
5cbbacec23 use the askama compile time template engine
this has the exact same syntax as tera (jinja style) but its compile
time which is very useful for having a portable binary that doesn't
require any files to run like a templates folder or public folder.
2023-06-29 21:24:53 -07:00
9c3002a8d0 add a not found template and reorgainze the code
this commit does quite a bit as it adds a not found html template and it
reorganized the code entirely by splitting stuff into modules.
2023-06-29 19:45:41 -07:00
8581bc5f65 remove an option to disable overflowing
looks like webrings should just overflow.
2023-06-29 18:05:34 -07:00
515e5ed199 add a json api.
i added a json api called /name which lets you get the previous and next
site name. i also modified the internal url functions to return a None
value if overflow is turned off and next or previous is nothing.
2023-06-28 16:13:48 -07:00
ebe7b5cbc5 add a basic implementation of the webring
you put your sites url into the url query and it should redirect you to
the next or previous site and it will overflow if you're the last or
first site in the array.
2023-06-28 15:08:23 -07:00
Mossfet
3e054fc7f0 Weeee 2023-06-28 21:32:25 +01:00
8391b63ce8 Initial commit 2023-06-28 20:10:48 +00:00