Commits at c4c4aa0b0b1bfeed8a7b13be69ff63ec135efba7
c4c4aa0bExtract main package derivation to dedicated Nix file
For readability. Having "default.nix" lets viewers know how to build the
package and/or what the package is made of.
Shota FUJI
authored at
Shota FUJI
comitted at
ee1ea99bConfigure podman devShell
Dockerfile has been there under contrib/ directory but is unmaintained
(as expected for "contrib" objects.) Since this project (both original
and this fork) is pure Go project without CGO, writing Dockerfile must
be easy so I wrote it.
The "podman" devShell is tested on NixOS. I don't know / care if it
works on other platforms.
I once set up dprint-dockerfile but abandoned it. The plugin is not in a
quality I saw in other dprint official plugins. Almost zero config
knobs, "fixing" inner-comment text's indentation, unwrapping multiline
JSON array (CMD), etc.
Shota FUJI
authored at
Shota FUJI
comitted at
5647b44cMake config file optional
It's for OCI container. The essential config keys are now able to be
populated via CLI flags.
Shota FUJI
authored at
Shota FUJI
comitted at
196f7e5dAllow omitting "server.name" option
To make config file optional.
Shota FUJI
authored at
Shota FUJI
comitted at
1c31b6ddUse Landlock to restrict filesystem access on Linux
https://tangled.org/pocka.jp/legit/issues/13
Shota FUJI
authored at
Shota FUJI
comitted at
1ba6a0a9Remove legacy build constraints
This fork requires Go v1.24, so the legacy notation is no longer
necessary. The old one requries different syntax for !(A || B).
Shota FUJI
authored at
Shota FUJI
comitted at
436d14d4Prevent path traversal outside project boundary in preview links
It's not that harmful, but cross-project links are confusing and
non-portable.
Shota FUJI
authored at
Shota FUJI
comitted at
99ef4012Add tests for internal link transformer
https://tangled.org/pocka.jp/legit/issues/10
Shota FUJI
authored at
Shota FUJI
comitted at
727c9690Remove unnecessary dot from internal links
Browsers will normalize fine, though.
Shota FUJI
authored at
Shota FUJI
comitted at
6450aeffAdd tests for internal media source link transformer
https://tangled.org/pocka.jp/legit/issues/10
Shota FUJI
authored at
Shota FUJI
comitted at
21b3950eUse monospace for object hash
For commit hashes, use of monospace is preferred because that makes the
width of commit hash consistent. "Commits for" in log page can be a
commit hash but I kept it as-is because most people would browse on branches.
Shota FUJI
authored at
Shota FUJI
comitted at
4c27b217Don't use system-ui for content texts
"system-ui" is for UI texts, not for content texts.
From now on, controls and labels use system-ui and content texts use
--font-content (sans-serif).
Shota FUJI
authored at
Shota FUJI
comitted at
83c692e6Fix header and footer not being sticky on wide viewport
Regression introduced at somewhere.
Shota FUJI
authored at
Shota FUJI
comitted at
c6e0d57aFix footer partially occlude aside section on short viewport
https://tangled.org/pocka.jp/legit/issues/12
Shota FUJI
authored at
Shota FUJI
comitted at
ac5d7349Fix commit hash on aside overflows horizontally
https://tangled.org/pocka.jp/legit/issues/11
Shota FUJI
authored at
Shota FUJI
comitted at
5fc79883Add pagination to commits page
Rendering all commits in a repo is not a good idea.
It's really slow and heavy on an active repository such as Zig the
language.
https://tangled.org/pocka.jp/legit/issues/9
Shota FUJI
authored at
Shota FUJI
comitted at
6248d4edFix long commit history slowing summary page
https://tangled.org/pocka.jp/legit/issues/7#comment-3mqn5xujwoh22
The summary page displays recent up to three commits, but underlying
logic reads the whole repo history then subslice the result. The loading
of entire commit history is really demanding task and slows the response
time of a summary page down a lot.
Before this patch, loading a summary page of Zig project took 900ms ~
1100ms. After this patch, it's 180ms under load.
Shota FUJI
authored at
Shota FUJI
comitted at
62b73d36Fix directory links in Markdown preview is incorrect
README and preview code uses each own rendering logic, caused diverged
output. An internal directory link inside preview HTML links to 404
(server returns 500) page.
This patch refactors HTML rendering into interface-d one and let both
endpoint use that. The original motivation for this refactor was to
cache rendered HTML, but turns out refactor alone is significant so I
gave this a dedicated commit.
Shota FUJI
authored at
Shota FUJI
comitted at
a4dcd129Compile HTML templates upfront
https://tangled.org/pocka.jp/legit/issues/5
Compiling HTML templates on every request is useless on production
deployment and slows down response time significantly.
This patch makes compile-on-request opt-in and upfront compilation a
default.
On my dev machine (Intel Core Ultra 9 285H), spam_repo_list 1,000
iterations / 30 VUs gets 6ms avg -> sub 1ms avg and spam_repo_summary
1,000 iterations / 30 VUs gets 8.2ms avg -> 2.5ms avg improvements.
Shota FUJI
authored at
Shota FUJI
comitted at
290981c5Don't unveil empty paths
Both templates dir and static dir are now optional.
I'm not sure empty paths will trigger error, though.
Shota FUJI
authored at
Shota FUJI
comitted at
f4a70d2bFix occasional git fetch error (gzipped upload-pack)
https://tangled.org/pocka.jp/legit/issues/6
https://github.com/icyphox/legit/pull/58
I could not write a test reliably triggers this condition (upload-pack
request having gzip body) even with system git.
Shota FUJI
authored at
Shota FUJI
comitted at
c9d54abbDeny git clone of ignored repo
https://tangled.org/pocka.jp/legit/issues/2
https://github.com/icyphox/legit/issues/56
There were no guard / check for "ignored" config in endpoints git client
uses, so everybody could clone ignored repositories.
Shota FUJI
authored at
Shota FUJI
comitted at
3a07b138Upgrade go-git
I needed "git.InitWithOptions" function added in v5.7.0.
Shota FUJI
authored at
Shota FUJI
comitted at
d224558eMove embedded resources into dedicated module
For testing. Child packages cannot access embedded resources.
Shota FUJI
authored at
Shota FUJI
comitted at
eac513f5Embed default templates into the binary
https://tangled.org/pocka.jp/legit/issues/3
https://github.com/icyphox/legit/issues/10
Deployment & distribution convenience.
Shota FUJI
authored at
Shota FUJI
comitted at