diff options
author | Runxi Yu <me@runxiyu.org> | 2025-04-05 18:26:51 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-04-05 18:26:51 +0800 |
commit | 4f4f6a25be2625b4bb2cb10e3520f52c4a35c243 (patch) | |
tree | 5458da1ee5efa5e46e831c34c1f39ebc67fb71b0 /http_handle_repo_index.go | |
parent | Remove renderReadmeAtTree (diff) | |
download | forge-4f4f6a25be2625b4bb2cb10e3520f52c4a35c243.tar.gz forge-4f4f6a25be2625b4bb2cb10e3520f52c4a35c243.tar.zst forge-4f4f6a25be2625b4bb2cb10e3520f52c4a35c243.zip |
Separate code/README rendering and unsafe to their own packages
Diffstat (limited to 'http_handle_repo_index.go')
-rw-r--r-- | http_handle_repo_index.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/http_handle_repo_index.go b/http_handle_repo_index.go index 182b5df..ef1b76e 100644 --- a/http_handle_repo_index.go +++ b/http_handle_repo_index.go @@ -8,6 +8,7 @@ import ( "strings" "go.lindenii.runxiyu.org/forge/git2c" + "go.lindenii.runxiyu.org/forge/render" ) type commitDisplay struct { @@ -45,7 +46,7 @@ func httpHandleRepoIndex(w http.ResponseWriter, req *http.Request, params map[st params["commits"] = commits params["readme_filename"] = readme.Filename - _, params["readme"] = renderReadme(readme.Content, readme.Filename) + _, params["readme"] = render.Readme(readme.Content, readme.Filename) params["notes"] = notes renderTemplate(w, "repo_index", params) |