diff --git a/internal/leetcode/config.go b/internal/leetcode/config.go index 79ef09c0b..cc77044ef 100644 --- a/internal/leetcode/config.go +++ b/internal/leetcode/config.go @@ -25,5 +25,4 @@ const ( questionDataFile = "question_data_%s.json" questionArticleFile = "question_article_%s.html" topicTagFile = "topic_tag_%s.json" - tagsFile = "tag/tags.json" ) diff --git a/internal/leetcode/topic_tag.go b/internal/leetcode/topic_tag.go index d39a74916..cd684bb46 100644 --- a/internal/leetcode/topic_tag.go +++ b/internal/leetcode/topic_tag.go @@ -11,7 +11,10 @@ import ( "github.com/openset/leetcode/internal/client" ) -var initTags []tagType +var ( + initTags []tagType + tagsFile = path.Join("tag", "tags.json") +) func init() { html := remember(problemsetAllFile, 7, func() []byte { @@ -124,7 +127,7 @@ func (tag tagType) SaveContents() { }) var buf bytes.Buffer buf.WriteString(authInfo("tag")) - buf.WriteString(fmt.Sprintf("\n## %s\n\n", tag.ShowName())) + buf.WriteString(fmt.Sprintf("\n## [话题分类](https://github.com/openset/leetcode/blob/master/tag/README.md) > %s\n\n", tag.ShowName())) buf.WriteString("| # | 题名 | 标签 | 难度 |\n") buf.WriteString("| :-: | - | - | :-: |\n") format := "| %s | [%s](https://github.com/openset/leetcode/tree/master/problems/%s)%s | %s | %s |\n"