Commits at 3693a076f215691e43bc22d08fac36bccb731095
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
0e496be9Embed static files into the binary
https://tangled.org/pocka.jp/legit/issues/3
Having to copy the "static/" directories is PITA, and distribution
burden.
Shota FUJI
authored at
Shota FUJI
comitted at
208876a9Don't generate bluemonday policy for each requests
https://tangled.org/pocka.jp/legit/issues/4
bluemonday's documentation says the policy creation/editing is not safe
to use in multiple goroutines. Now only one policy exists in the entire
application and no creation/editing is happening inside HTTP server's
goroutine.
This also brings performance improvements. On my machine, spamming repo
summary page took 10ms~11ms med (avg), but with this patch they are now
7ms~8ms med (avg).
k6 run --vus 30 --iterations 1000 ./tests/k6/spam_repo_summary.js
Thank Anthony Wang for sending the original patch that brought this
topic in.
Shota FUJI
authored at
Shota FUJI
comitted at
c2244176Exclude unnecessary files from Nix source
To prevent unnecessary rebuilds. Changes to README should not issue a
new build.
Shota FUJI
authored at
Shota FUJI
comitted at
afb93b77Set "meta.mainProgram" in Nix derivation
Nix outputs warning message when **user** calls "lib.getExe" on this
package.
---
evaluation warning: getExe: Package legit does not have the meta.mainProgram
attribute. We'll assume that the main program has the same name for now, but
this behavior is deprecated, because it leads to surprising errors when the
assumption does not hold. If the package has a main program, please set
`meta.mainProgram` in its definition to make this warning go away. Otherwise,
if the package does not have a main program, or if you don't control its
definition, use getExe' to specify the name to the program, such as
lib.getExe' foo "bar".
Shota FUJI
authored at
Shota FUJI
comitted at
912daf3fSetup load testing
It's minimal, but useful for future additions.
Considering the current trend of malcious crawlers, I believe this is
necessary.
Shota FUJI
authored at
Shota FUJI
comitted at
932dc3e7Add -server.host and -server.port CLI flags
This is handy for development inside a container / VM.
Shota FUJI
authored at
Shota FUJI
comitted at
fbc46772Add footer
The motivation is to display "Powered by ...". The patch I received adds
that text to header, and I felt it stands out too much considering
frequency of user using (reading and getting actually useful
information from) it. I like the idea of "Powered by" as there were
times that text helped me discover new tools.
The most natural place to put it is footer, but my legit fork does not
have that. And just having "Powered by ..." text alone feels off, so I
added admin configurable links section for things like contact email
address, mirrors, and other social links.
I personally like the outcome.
Shota FUJI
authored at
Shota FUJI
comitted at
784362b7Display message if no README found
The info log is completely useless, as it's repo owner's fault for not
having README, instead of site admin's. I configured this in the
template so users (site admins) can customize their own view.
Shota FUJI
authored at
Shota FUJI
comitted at
2b352672Fix weird URL search parameter handling (raw=true)
A query component in URL does not have to be "key=value". In fact,
browsers interpret that as a URLSearchParams, a list of "key" or
"key=value" allowing a same key appearing multiple times. You don't have
to set "true" or "false": simply set the key or remove the one.
Shota FUJI
authored at
Shota FUJI
comitted at
09c5f871Display checked-in image in Markdown preview
Co-authored-by: Anthony Wang <a@unnamed.website>
Shota FUJI
authored at
Shota FUJI
comitted at
d3443fb7Add "gopls" to "nix develop" packages
To stop requiring devs to install gopls globally.
Shota FUJI
authored at
Shota FUJI
comitted at
66fa2bb5Add link for raw version of file
The original patch also contains support for image display in READMEs.
I (committer) removed the latter for brevity and revert-ability.
Anthony Wang
authored at
Shota FUJI
comitted at
f72154deFix binary file not available even with "raw" URL parameter
This is critical for displaying images in README files.
Shota FUJI
authored at
Shota FUJI
comitted at
07103b7dSetup "nix fmt"
There was no way to call dprint (except "nix-shell" and global mutation)
Shota FUJI
authored at
Shota FUJI
comitted at
fab9af91Upgrade nixpkgs
The dprint CLI was too old a JSON dprint plugin denied to run.
Shota FUJI
authored at
Shota FUJI
comitted at
4efb241dFix blob page code block slightly overflows vertically
That makes unpleasant UX, such as almost-full scrollbars and requiring
two-fingers swipe twice (one for scroll `<pre>` and second for the page)
Shota FUJI
authored at
Shota FUJI
comitted at
5e20b033HTML preview for Markdown
While Markdown is relatively readable format, syntax highlighted
monospace font is not easy to read compared to well-spaced sans-serif.
Shota FUJI
authored at
Shota FUJI
comitted at
d38d10b2Increase top padding on 3-column layout
I don't know why, but it was uncomfortable to read texts at the very
near the top of a content area.
Shota FUJI
authored at
Shota FUJI
comitted at
291d38c0Add more spaces to Markdown headings
Those were so packed and hard to read.
Shota FUJI
authored at
Shota FUJI
comitted at