Skip to content

Commit

Permalink
doc(index): better version display; addd link to repo, wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
litlighilit committed Jan 2, 2025
1 parent c9f45d1 commit 7da79a7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/pylib.nim
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,17 @@ when not defined(pylibNoLenient):
when defined(nimdoc):
from pylib/version import Version
import std/macros
import std/strformat
macro doc(s: static[string]): untyped = newCommentStmtNode s

doc "> Welcome to pylib " & Version
const
RepoUrl = "https://github.com/nimpylib/pylib"
ReadmeUrl = RepoUrl & "?tab=readme-ov-file#nimpylib"
WikiUrl = RepoUrl & "/wiki"
template link(name, url: string): string = "[" & name & "](" & url & ")"

doc "> Welcome to **NimPyLib** :sub:`" & Version & "`" # Nim's Markdown is RST-extended
doc fmt"""- link to {link("repo", ReadmeUrl)}, {link("wiki", WikiUrl)}"""
## .. include:: ../doc/pylib.md
doc ".. warning:: " & WarnLeniOps

Expand Down

0 comments on commit 7da79a7

Please sign in to comment.