b6f116f8c1
updates
Build CI / pre-build-checks (push) Failing after 3s
Build CI / build (amd64) (push) Has been skipped
Build CI / build (arm64) (push) Has been skipped
2026-08-13 01:51:37 +02:00
db71d66600
fmt
2026-08-13 01:50:53 +02:00
d1cd496a6d
add dev flake
Build CI / pre-build-checks (push) Failing after 3s
Build CI / build (amd64) (push) Has been skipped
Build CI / build (arm64) (push) Has been skipped
2026-05-31 15:06:57 +02:00
fa2698eaa4
update dependencies
2026-05-31 15:06:32 +02:00
Leonora Tindall
cac483b99f
Rebrand the client to NoraCodes ( #5 )
...
* NoraCodes branding in /r/client
* Bump noracodes fork version
2023-03-01 15:37:38 -06:00
Leonora Tindall
ba32ab5290
Update to WG Upstream ( #4 )
...
* Fix typo: pretter -> pretty
* fix: corrected spelling of "minimalistic"
* Fix various build warnings.
---------
Co-authored-by: Jonas Geiler <skayo.dev@gmail.com>
2023-03-01 15:24:28 -06:00
Leonora Tindall
fdf38d4e55
Remove fly and docker CI ( #2 )
2023-03-01 12:30:39 -06:00
Leonora Tindall
9673f563e0
nora.codes branding for noracodes fork
2022-04-26 11:26:25 -05:00
Leonora Tindall
874e12fe3f
Add raw link on pretty pages
2022-04-26 11:23:03 -05:00
Leonora Tindall
c3aa68af78
Move raw to /r/ instead of /
2022-04-26 11:23:00 -05:00
Leonora Tindall
460e0ac022
Redirect on invalid UTF-8 in /p/
...
Previously, uploading a paste with invalid UTF-8 and then viewing it
with the pretty URL would cause a panic.
With this change, it simply redirects to the raw URL.
2022-04-26 11:03:14 -05:00
Gunwant Jain
1e0e3b319c
bin v2.2.1
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-04-23 05:31:35 +05:30
Gunwant Jain
2e84ba2079
pretty.css: add media queries to move pastes down on phones
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-04-23 05:26:11 +05:30
Gunwant Jain
c8637b04dd
Index: Add option to remove /client help
...
fixes #7
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-04-23 04:48:06 +05:30
Simon LEONARD
78f8398382
webclient: tab key support
...
Tabulation key adds 4 spaces at current cursor position
Signed-off-by: Simon LEONARD <git-1001af4@sinux.sh>
2022-03-17 15:28:33 +05:30
Gunwant Jain
0305742d6d
Apply clippy suggestions
...
Use the latest rust version
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-03-15 14:03:08 +05:30
Gunwant Jain
efc1a9df58
bin v2.2.0
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-02-08 02:00:20 +05:30
Gunwant Jain
3a5212e09c
tools/prepush: apply the formatting instead of checking it
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-02-08 01:57:26 +05:30
Gunwant Jain
08ec2cbecb
Provide Cache-Control Headers
...
max-age = 1 week for everything
stale-while-revalidate = 1 day for everything except raw pastes
immutable for raw pastes
Most likely fixes #2 , unless I forgot something.
Suggested-by: Leonora Tindall <ltindall@fastly.com>
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-02-08 01:46:05 +05:30
Gunwant Jain
884be16dc4
Use / for raw pastes
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-02-07 01:59:41 +05:30
Leonora Tindall
2ab7ddb9c8
Add cache-busting and server headers with a wrapper.
...
In order to support custom headers for various response types,
this commit adds a wrapper type, ResponseWrapper, which can service
all types of response in `bin`.
For paste objects, the preferred `Last-Modified` is used, so that caches
can compare their exact timings with the HEAD response when
revalidating.
For static objects, an `ETag` is used instead, based on the Cargo version
and git hash of the codebase at compilation time; a `build.rs` is used
for this.
2022-02-05 06:20:33 +05:30
Gunwant Jain
55ed495b83
contributing: add info in the readme, add a pr template
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-02-03 01:23:57 +05:30
Gunwant Jain
022f3203f1
Merge pull request #1 from NoraCodes/nora/redirect_on_invalid_utf8
...
Redirect on invalid UTF-8 in /p/
2022-02-03 00:51:54 +05:30
Gunwant Jain
9b8db58768
Merge pull request #4 from NoraCodes/nora/prepush-hook
...
Add pre-push script for format and clippy
2022-02-03 00:29:50 +05:30
Leonora Tindall
447221ca16
Add pre-push script for format and clippy
2022-02-02 12:56:41 -06:00
Leonora Tindall
5aafe2500a
Redirect on invalid UTF-8 in /p/
...
Previously, uploading a paste with invalid UTF-8 and then viewing it
with the pretty URL would cause a panic.
With this change, it simply redirects to the raw URL.
2022-02-02 12:52:24 -06:00
Gunwant Jain
ea144a1024
fix loading multi-dot extensions
...
Old slug rules for syntax highlighted pastes did not allow for a
multi-dot paste. This fixes it
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-25 15:16:35 +05:30
Gunwant Jain
eff3f0dbd6
pretty: add softwrapping to pastes
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-25 14:34:21 +05:30
Gunwant Jain
dff3e673c2
flyci: detach daemon after deployment
...
Otherwise the github action hangs on the job.
I should open an issue regarding this on fly's tracker.
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-25 03:21:03 +05:30
Gunwant Jain
6104639596
Add a ton of new syntaxes
...
All thanks to guys at Broot, which took it from bat
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-25 02:27:41 +05:30
Gunwant Jain
9c986c1327
fonts: switch to serving fonts from the server
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-24 16:08:25 +05:30
Gunwant Jain
1950e89cbc
fly.toml: using mapped env variables is a PITA on TOML
...
Until I find a way to do it, the demo instance would have a form upload
size limit.
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-24 13:58:11 +05:30
Gunwant Jain
ab99405c89
Showcase the demo version
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-21 13:38:06 +05:30
Gunwant Jain
fa9a97ce9c
Add automated Fly.io deployments
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-21 12:36:36 +05:30
Gunwant Jain
54aa737661
bin: v2.0.0
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-20 16:52:21 +05:30
Gunwant Jain
78e3319d66
buildci: save compute time by singling pre-build steps
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-20 05:32:52 +05:30
Gunwant Jain
a6709a1307
buildci: generalise for all push events and PRs
...
This means that tags are included now
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-20 05:21:25 +05:30
Gunwant Jain
3968796a49
github: add buildci and its helper script
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-20 04:46:02 +05:30
Gunwant Jain
689db9548a
src: cargo clippy and fmt the project
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-20 03:50:38 +05:30
Gunwant Jain
3ed972e672
github: add docker ci
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-19 23:13:17 +05:30
Gunwant Jain
8e23ec4c97
readme: add gifs
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-19 18:52:10 +05:30
Gunwant Jain
edc247b558
Templates: fix the content type of templates
...
Templating is weird af in Rocket. Look into 3a541ae for more.
The content-type of the rendering is determined by the extension of the
template name.
But renaming these templates would break building the project for
development because it finds a phony template there. So the trick is to
default the `template_dir` to `args.upload` because it should never
interfere and will be always present.
This also fixes the hax in Dockerfile by making it the default.
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-19 16:33:57 +05:30
Gunwant Jain
a11321c251
readme: major overhaul
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-19 02:11:23 +05:30
Gunwant Jain
3a541aed23
Templates: embed the templates in-binary
...
Rocket's templating is not exactly friendly when it comes to embedding
in-binary. Rocket's template fairing requires a `template_dir` directory
pointing to the directory containing templates.
A quick workaround to this would be to have custom fairings with
`template_dir` merged with the value `.`
But in bare-metal scenarios like what docker's scratch image mimics, we
don't exactly have a '.' file, so instead for this very project, I have
to point the `template_dir` to the `upload` folder, which is created by
`bin` on execution. Checkout the Dockerfile for more info
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-19 01:58:11 +05:30
Gunwant Jain
78b4213c62
cargo-fmt the src
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-18 16:18:52 +05:30
Gunwant Jain
ce001c6a79
Args: implement upload arg
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-18 15:48:21 +05:30
Gunwant Jain
6961ed59b4
main: Add arguments and the respective parsing
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-18 15:47:54 +05:30
Gunwant Jain
f35bad75e5
pretty: embed the theme in-binary
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-18 13:13:45 +05:30
Gunwant Jain
892e84348d
static_files: embed files in-binary
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-18 12:16:07 +05:30
Gunwant Jain
e91393f63c
cli client: update and move to contrib
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-18 10:21:32 +05:30