diff options
| author | Eltrac <hi@guhub.cn> | 2025-10-21 11:26:57 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-10-21 11:26:57 +0800 |
| commit | dbea3c444c17032aa8524c337976610ee0a81fa2 (patch) | |
| tree | 62b37ce1e7318f925c34535837cc6ae6824d924b /scripts | |
| parent | 00779afc961f870913269b420c884b61809ecc76 (diff) | |
fix(build): function parameter overwrites certain object
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/extract_links.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/extract_links.go b/scripts/extract_links.go index 2b7b243a..657cb738 100644 --- a/scripts/extract_links.go +++ b/scripts/extract_links.go @@ -112,10 +112,10 @@ func parseFrontmatter(filepath string) (Frontmatter, int) { return fm, lineNum } -func getCanonicalURL(filepath string, fm Frontmatter) string { - rel, _ := filepathRel(contentDir, filepath) +func getCanonicalURL(path string, fm Frontmatter) string { + rel, _ := filepathRel(contentDir, path) dir := filepath.Dir(rel) - base := strings.TrimSuffix(filepath.Base(filepath), ".md") + base := strings.TrimSuffix(filepath.Base(path), ".md") slug := fm.Slug if slug == "" { slug = strings.ToLower(base) |
