mirror of
https://github.com/Xevion/leetcode.git
synced 2025-12-06 01:15:23 -06:00
TODO category filter page generation, link LeetCode tag page for now
This commit is contained in:
@@ -91,7 +91,10 @@ def main():
|
||||
f"[{question.title}]({question.url})",
|
||||
solutions,
|
||||
question.difficulty,
|
||||
", ".join(f"[{tag.name}](/categories/{tag.slug.upper()}.md)" for tag in question.tags),
|
||||
", ".join(
|
||||
# TODO: Generate category pages as a "filter" page for the README.md file.
|
||||
# {/categories/tag.slug.upper()}.md
|
||||
f"[{tag.name}]({tag.url})" for tag in question.tags),
|
||||
]
|
||||
|
||||
row = "| " + " | ".join(map(str, columns)) + " |"
|
||||
|
||||
@@ -27,6 +27,13 @@ class Tag(BaseModel):
|
||||
slug: str
|
||||
name: str
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
"""
|
||||
Gets the URL to the tag.
|
||||
"""
|
||||
return f"https://leetcode.com/tag/{self.slug}"
|
||||
|
||||
|
||||
class Question(BaseModel):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user