Skip to content

Commit

Permalink
Merge pull request #304 from JeongUkJae/master
Browse files Browse the repository at this point in the history
Show package's version on generated docs
  • Loading branch information
dahlia committed Aug 15, 2018
2 parents 1d6c839 + 23110ea commit b91a30a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ To be released.
to customize the look and feel of the result pages.
- Fixed an incorrect processing of [CommonMark] thight list items: it had
crashed when a thight list item contains blocks other than paragraphs.
- Package's version became shown on the generated docs.
[[#297], [#304] by Jeong Ukjae]

### Python target

Expand All @@ -40,7 +42,9 @@ To be released.

[#126]: https://github.com/nirum-lang/nirum/issues/126
[#281]: https://github.com/nirum-lang/nirum/pull/281
[#297]: https://github.com/nirum-lang/nirum/issues/297
[#300]: https://github.com/nirum-lang/nirum/pull/300
[#304]: https://github.com/nirum-lang/nirum/pull/304
[CommonMark]: http://commonmark.org/
[table syntax extension]: https://github.github.com/gfm/#tables-extension-
[special attributes extension]: https://michelf.ca/projects/php-markdown/extra/#spe-attr
Expand Down
3 changes: 3 additions & 0 deletions src/Nirum/Targets/Docs.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import Data.Map.Strict (Map, mapKeys, mapWithKey, unions)
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
import Data.Text.Encoding (decodeUtf8, encodeUtf8)
import qualified Data.SemVer
import System.FilePath
import Text.Blaze (ToMarkup (preEscapedToMarkup))
import Text.Blaze.Html.Renderer.Utf8 (renderHtml)
Expand Down Expand Up @@ -111,9 +112,11 @@ $doctype 5
<a class="index selected" href="#{root}index.html">
<strong>
#{docsTitle $ target pkg}
#{Data.SemVer.toText $ version md}
$else
<a class="index" href="#{root}index.html">
#{docsTitle $ target pkg}
#{Data.SemVer.toText $ version md}
<ul.manuals.toc>
$forall (documentPath, doc) <- documentPairs
$if currentPage == DocumentPage documentPath
Expand Down

0 comments on commit b91a30a

Please sign in to comment.