From e09fd5cf7551c8016fc46cf73cc801ed287da6f0 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Tue, 21 Oct 2025 11:26:57 +0800 Subject: fix(build): function parameter overwrites certain object Former-commit-id: dbea3c444c17032aa8524c337976610ee0a81fa2 --- scripts/extract_links.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/extract_links.go') 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) -- cgit v1.2.3