59 Commits (24f8b36afff519514686afa01fb8fc080f4ff6f0)

Author SHA1 Message Date
Peter Cai d3745ae188
add MIT LICENSE 3 years ago
Peter Cai eeb13b44e9
blog: use ExtendableEvent.wait_until()
we need to guarantee the promise will not be cancelled
3 years ago
Peter Cai ffb4c24292
get rid of dead code warnings 3 years ago
Peter Cai 5c2615a6cb
blog: get rid of Vec allocation in render for good
just spawn the cache whitelist task onto the js ev loop and don't care
about it; the write only need to succeed once and that normally happens
at the very first time.
3 years ago
Peter Cai e0d8c94986
blog: remove useless lifetime parameter 3 years ago
Peter Cai 10339daf09
blog: refactor: rewrite more transform as iterator operations 3 years ago
Peter Cai 994da996bc
blog: refactor: apply highlight via idomatic Iterator operations 3 years ago
Peter Cai 81fda6e1c8
add a preferred_url option 3 years ago
Peter Cai a9e3490478
sn: implement the Delete action 3 years ago
Peter Cai 3a1520f0db
blog: take non-labelled code blocks into account 3 years ago
Peter Cai 5f790e4b37
blog: make links open in new tab by default 3 years ago
Peter Cai 4bf676419d
blog: use RegExp from js_sys to handle headings and code blocks 3 years ago
Peter Cai e1033ff0b3
support adding description meta tag to pages
using the page context
3 years ago
Peter Cai 15f78ea632
lib: get rid of the "hello world" endpoint 3 years ago
Peter Cai 2064f36b14
lib: remove TODO for page rendering 3 years ago
Peter Cai 1ddd586694
sn: return error instead of fail silently for malformed metadata
protect people from accidentally submitting malformed header and then
making things public on accident.
3 years ago
Peter Cai d6b479ec15
support per-post theme_config in custom metadata 3 years ago
Peter Cai 800a39956a
render: add pathname to the page context
needed when we need to insert a comment system
3 years ago
Peter Cai daccf6c142
add support for hard-coded extra proxied resources 3 years ago
Peter Cai 44ca2f6de3
support cache-control for static resources 3 years ago
Peter Cai e727bce188
add support for hard-coded redirects in config.json 3 years ago
Peter Cai 2ee88e11b0
drop rbtag and use our own hand-rolled implementation
because we need to update build timestamp each time anything related to
rendering is changed. The rbtag crate only supports git commit times.

Also, reproducible build isn't exactly a goal of this project.
3 years ago
Peter Cai 54ca223ed6
blog: use build timestamp as CACHE_VERSION 3 years ago
Peter Cai 311b9a0d26
hljs: binding: catch hljs errors when specifying language
the language may not exist. do not crash the entire program due to this
3 years ago
Peter Cai f519152465
integrate hljs into backend to provide code highlighting
1. Use hljs and wasm_bindgen to parse code
2. Allow the final user to choose what language to include by generating
   inline_js in build.rs for #[wasm_bindgen] (a thin wrapper around the
   raw hljs to load whatever is needed by config.json statically rather
   than dynamically)
3. Integrate the monokai color scheme into our default theme
3 years ago
Peter Cai 26bb98b11e
blog: enable all markdown extensions supported by pulldown_cmark 3 years ago
Peter Cai de8eace92e
render: use static Handlebars instance 3 years ago
Peter Cai 1f2fee8341
implement RSS feed
as an alternative common template for home page
3 years ago
Peter Cai f714591b25
implement manual summary marker 3 years ago
Peter Cai 9b018b559d
implement automatic anchor generation for headings 3 years ago
Peter Cai 23d899dd0e
support build-time theme selection via build.rs 3 years ago
Peter Cai d8f05bad95
render: remove dummy argument in handlebars helper
turns out they just can't handle `||` -- adding a space in between fixes
the problem.
3 years ago
Peter Cai bbcb48beeb
implement post page rendering 3 years ago
Peter Cai 1110a2614b
render: implement pagination 3 years ago
Peter Cai e599007ed4
use build datetime as version string on static resources 3 years ago
Peter Cai 150940cd8c
add template and implement rendering 3 years ago
Peter Cai b2d6678405
sanitize proxied remote content response
re-construct the Response object to make sure no strange headers slip
into our own response.
3 years ago
Peter Cai d8edb51d6a
add explanation why we need a custom binding 3 years ago
Peter Cai 4474769004
proxy remote media inserted in posts
To protect user privacy and speed up page loading
3 years ago
Peter Cai 1b42c65294
blog: add more comment on PostContentCache 3 years ago
Peter Cai 2bd9b169f3
blog: add more comment on cache version 3 years ago
Peter Cai 8ba086a9ec
implement Markdown rendering 3 years ago
Peter Cai fe22944cb4
add some no-cache headers 3 years ago
Peter Cai cd8f761fcf
implement showing blog
no rendering yet
3 years ago
Peter Cai aa95d978ec
add alias support for `unlisted` 3 years ago
Peter Cai 7de1212993
also remove post from list if unlist is set 3 years ago
Peter Cai c68263a7bd
add comments to note on unlisted notes 3 years ago
Peter Cai b337306799
utils: also kill punctuations when generating URLs 3 years ago
Peter Cai b87c97c8ed
support unlisted posts 3 years ago
Peter Cai 8fe31281f0
support customized metadata 3 years ago