diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-10 20:53:27 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-10 20:53:27 +0800 |
commit | a3a9719af3d648c90b049e94d7d446651d0d011b (patch) | |
tree | a677752602b80b8dac97d1955ed32c7a506f033d /template_funcs.go | |
parent | style.css: Separate darker and lighter border colors (diff) | |
download | forge-a3a9719af3d648c90b049e94d7d446651d0d011b.tar.gz forge-a3a9719af3d648c90b049e94d7d446651d0d011b.tar.zst forge-a3a9719af3d648c90b049e94d7d446651d0d011b.zip |
repo_tree: Fix URL and anchor issues
Diffstat (limited to '')
-rw-r--r-- | template_funcs.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/template_funcs.go b/template_funcs.go index 3c5ca0b..1c68650 100644 --- a/template_funcs.go +++ b/template_funcs.go @@ -1,8 +1,15 @@ package main -import "strings" +import ( + "path/filepath" + "strings" +) func first_line(s string) string { before, _, _ := strings.Cut(s, "\n") return before } + +func base_name (s string) string { + return filepath.Base(s) +} |