Skip to content

Commit

Permalink
GitHub Template v2.2
Browse files Browse the repository at this point in the history
In the "GitHub Pandoc HTML5 Template" change the TOC template variable
from `$toc$` to `$table-of-contents$` to ensure proper behaviour in all
contexts, as suggested by @dhanak. (Fixes #10)

Update the dates range in the GH template's and repo's copyright notices
to include year 2020.
  • Loading branch information
tajmone committed Aug 12, 2020
1 parent f2a4d28 commit c7963da
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 124 deletions.
113 changes: 61 additions & 52 deletions templates/html5/github/GitHub-Template-Preview.html

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions templates/html5/github/GitHub.html5
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
$--| GitHub HTML5 Pandoc Template" v2.1 | 2018/02/28 | pandoc v2.1.1
$--| GitHub HTML5 Pandoc Template" v2.2 | 2020/08/12 | pandoc v2.1.1
<!DOCTYPE html>
<!--
==============================================================================
"GitHub HTML5 Pandoc Template" v2.1 — by Tristano Ajmone
"GitHub HTML5 Pandoc Template" v2.2 — by Tristano Ajmone
==============================================================================
Copyright © Tristano Ajmone, 2017, MIT License (MIT). Project's home:
Copyright © Tristano Ajmone, 2017-2020, MIT License (MIT). Project's home:
- https://github.com/tajmone/pandoc-goodies
Expand All @@ -17,15 +17,15 @@ The CSS in this template reuses source code taken from the following projects:
http://primercss.io/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The MIT License
The MIT License
Copyright (c) Tristano Ajmone, 2017 (github.com/tajmone/pandoc-goodies)
Copyright (c) Tristano Ajmone, 2017-2020 (github.com/tajmone/pandoc-goodies)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Copyright (c) 2017 GitHub Inc.
"GitHub Pandoc HTML5 Template" is Copyright (c) Tristano Ajmone, 2017, released
under the MIT License (MIT); it contains readaptations of substantial portions
of the following third party softwares:
"GitHub Pandoc HTML5 Template" is Copyright (c) Tristano Ajmone, 2017-2020,
released under the MIT License (MIT); it contains readaptations of substantial
portions of the following third party softwares:
(1) "GitHub Markdown CSS", Copyright (c) Sindre Sorhus, MIT License (MIT).
(2) "Primer CSS", Copyright (c) 2016 GitHub Inc., MIT License (MIT).
Expand All @@ -52,7 +52,7 @@ $-------------------------------------------------------------------------> lang
<html$if(lang)$ lang="$lang$"$endif$$if(dir)$ dir="$dir$"$endif$>
<head>
$--=============================================================================
$-- METADATA
$-- METADATA
$--=============================================================================
<meta charset="$if(charset)$$charset$$else$utf-8$endif$" />
<meta name="generator" content="pandoc" />
Expand All @@ -76,7 +76,7 @@ $endif$
$------------------------------------------------------------------------> title
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
$--===========================================================================
$-- CSS STYLESHEETS
$-- CSS STYLESHEETS
$--===========================================================================
$-- Here comes the placeholder (within double braces) that will be replaced
$-- by the CSS file in the finalized template:
Expand Down Expand Up @@ -150,7 +150,7 @@ $if(toc)$
<hr>
<nav id="$idprefix$TOC">
<h1 class="toc-title">$if(toc-title)$$toc-title$$else$Contents$endif$</h1>
$toc$
$table-of-contents$
</nav>
<hr>
$endif$
Expand Down
8 changes: 4 additions & 4 deletions templates/html5/github/LICENSE
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
MIT License

Copyright (c) Tristano Ajmone, 2017 (github.com/tajmone/pandoc-goodies)
Copyright (c) Tristano Ajmone, 2017-2020 (github.com/tajmone/pandoc-goodies)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Copyright (c) 2017 GitHub Inc.

"GitHub Pandoc HTML5 Template" is Copyright (c) Tristano Ajmone, 2017, released
under the MIT License (MIT); it contains readaptations of substantial portions
of the following third party softwares:
"GitHub Pandoc HTML5 Template" is Copyright (c) Tristano Ajmone, 2017-2020,
released under the MIT License (MIT); it contains readaptations of substantial
portions of the following third party softwares:

(1) "GitHub Markdown CSS", Copyright (c) Sindre Sorhus, MIT License (MIT).
(2) "Primer CSS", Copyright (c) 2016 GitHub Inc., MIT License (MIT).
Expand Down
78 changes: 47 additions & 31 deletions templates/html5/github/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GitHub Pandoc HTML5 Template

GitHub Template v2.1 (2018/02/28) | pandoc v2.1.1
GitHub Template v2.2 (2020/08/12) | pandoc v2.1.1

A pandoc html5 template mimicking GitHub's documents preview. Supports extended GitHub Flavored Markdown features through custom pp-macros that leverage Raw HTML and GitHub's CSS.

Expand Down Expand Up @@ -101,36 +101,38 @@ The `--self-contained` option will make pandoc use `data:` URIs to incorporate i

**GitHub HTML5 Panodc Template** is Copyright © Tristano Ajmone, 2017, released under [The MIT License](./LICENSE) (MIT):

MIT License

Copyright (c) Tristano Ajmone, 2017 (github.com/tajmone/pandoc-goodies)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Copyright (c) 2017 GitHub Inc.

"GitHub Pandoc HTML5 Template" is Copyright (c) Tristano Ajmone, 2017, released
under the MIT License (MIT); it contains readaptations of substantial portions
of the following third party softwares:

(1) "GitHub Markdown CSS", Copyright (c) Sindre Sorhus, MIT License (MIT).
(2) "Primer CSS", Copyright (c) 2016 GitHub Inc., MIT License (MIT).

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
MIT License
Copyright (c) Tristano Ajmone, 2017-2020 (github.com/tajmone/pandoc-goodies)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Copyright (c) 2017 GitHub Inc.
"GitHub Pandoc HTML5 Template" is Copyright (c) Tristano Ajmone, 2017-2020,
released under the MIT License (MIT); it contains readaptations of substantial
portions of the following third party softwares:
(1) "GitHub Markdown CSS", Copyright (c) Sindre Sorhus, MIT License (MIT).
(2) "Primer CSS", Copyright (c) 2016 GitHub Inc., MIT License (MIT).
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

# Credits

Expand Down Expand Up @@ -158,6 +160,8 @@ These template files are derivatives from the **Primer CSS** project's modules:

# Changelog

- **v2.2** (2020-08-12)
- Change TOC template variable from `$toc$` to `$table-of-contents$` in order to ensure proper behaviour in all contexts. (thanks to [David Hanak] for pointing this out — See [#10])
- **v2.1** (2018-02-28)
- New `$charset$` template var to (optionally) override document enconding.
- **v2.0** (2017-11-21)
Expand All @@ -169,4 +173,16 @@ These template files are derivatives from the **Primer CSS** project's modules:
- **v1.0** (2017-04-09)
- First release.

<!-----------------------------------------------------------------------------
REFERENCE LINKS
------------------------------------------------------------------------------>

<!-- issues -->

[#10]: https://github.com/tajmone/pandoc-goodies/issues/10 "See Issue #10 — $table-of-contents$ instead of $toc$"

<!-- people -->

[David Hanak]: https://github.com/dhanak "View David Hanak's GitHub profile"

<!-- EOF -->
22 changes: 11 additions & 11 deletions templates/html5/github/src/GitHub_source.html5
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
$--| GitHub HTML5 Pandoc Template" v2.1 | 2018/02/28 | pandoc v2.1.1
$--| GitHub HTML5 Pandoc Template" v2.2 | 2020/08/12 | pandoc v2.1.1
<!DOCTYPE html>
<!--
==============================================================================
"GitHub HTML5 Pandoc Template" v2.1 — by Tristano Ajmone
"GitHub HTML5 Pandoc Template" v2.2 — by Tristano Ajmone
==============================================================================
Copyright © Tristano Ajmone, 2017, MIT License (MIT). Project's home:
Copyright © Tristano Ajmone, 2017-2020, MIT License (MIT). Project's home:
- https://github.com/tajmone/pandoc-goodies
Expand All @@ -17,15 +17,15 @@ The CSS in this template reuses source code taken from the following projects:
http://primercss.io/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The MIT License
The MIT License
Copyright (c) Tristano Ajmone, 2017 (github.com/tajmone/pandoc-goodies)
Copyright (c) Tristano Ajmone, 2017-2020 (github.com/tajmone/pandoc-goodies)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Copyright (c) 2017 GitHub Inc.
"GitHub Pandoc HTML5 Template" is Copyright (c) Tristano Ajmone, 2017, released
under the MIT License (MIT); it contains readaptations of substantial portions
of the following third party softwares:
"GitHub Pandoc HTML5 Template" is Copyright (c) Tristano Ajmone, 2017-2020,
released under the MIT License (MIT); it contains readaptations of substantial
portions of the following third party softwares:
(1) "GitHub Markdown CSS", Copyright (c) Sindre Sorhus, MIT License (MIT).
(2) "Primer CSS", Copyright (c) 2016 GitHub Inc., MIT License (MIT).
Expand All @@ -52,7 +52,7 @@ $-------------------------------------------------------------------------> lang
<html$if(lang)$ lang="$lang$"$endif$$if(dir)$ dir="$dir$"$endif$>
<head>
$--=============================================================================
$-- METADATA
$-- METADATA
$--=============================================================================
<meta charset="$if(charset)$$charset$$else$utf-8$endif$" />
<meta name="generator" content="pandoc" />
Expand All @@ -76,7 +76,7 @@ $endif$
$------------------------------------------------------------------------> title
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
$--===========================================================================
$-- CSS STYLESHEETS
$-- CSS STYLESHEETS
$--===========================================================================
$-- Here comes the placeholder (within double braces) that will be replaced
$-- by the CSS file in the finalized template:
Expand Down Expand Up @@ -150,7 +150,7 @@ $if(toc)$
<hr>
<nav id="$idprefix$TOC">
<h1 class="toc-title">$if(toc-title)$$toc-title$$else$Contents$endif$</h1>
$toc$
$table-of-contents$
</nav>
<hr>
$endif$
Expand Down
8 changes: 4 additions & 4 deletions templates/html5/github/src/LICENSE
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
MIT License

Copyright (c) Tristano Ajmone, 2017 (github.com/tajmone/pandoc-goodies)
Copyright (c) Tristano Ajmone, 2017-2020 (github.com/tajmone/pandoc-goodies)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Copyright (c) 2017 GitHub Inc.

"GitHub Pandoc HTML5 Template" is Copyright (c) Tristano Ajmone, 2017, released
under the MIT License (MIT); it contains readaptations of substantial portions
of the following third party softwares:
"GitHub Pandoc HTML5 Template" is Copyright (c) Tristano Ajmone, 2017-2020,
released under the MIT License (MIT); it contains readaptations of substantial
portions of the following third party softwares:

(1) "GitHub Markdown CSS", Copyright (c) Sindre Sorhus, MIT License (MIT).
(2) "Primer CSS", Copyright (c) 2016 GitHub Inc., MIT License (MIT).
Expand Down
22 changes: 11 additions & 11 deletions templates/html5/github/src/PREVIEW.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
!def( TEMPL_VER )( v2.1 )
!def( TEMPL_DATE )( 2018-02-28 )
!def( TEMPL_VER )( v2.2 )
!def( TEMPL_DATE )( 2020-08-12 )
!comment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"PREVIEW.md" v2.1 | 2018-02-28
Tested with "GitHub HTML5 Pandoc Template" v2.1 | 2018/02/28
"PREVIEW.md" v2.2 | 2020-08-12
Tested with "GitHub HTML5 Pandoc Template" v2.2 | 2020-08-12
This file holds the contents that will go in "../GitHub-Template-Preview.html"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -39,7 +39,7 @@ summary: |
__DISCLAIMER__ --- This theme _is not_ officialy endorsed by GitHub Inc.: it's just a personal project by the author.
The presence of the word "GitHub" in the template's name only indicates that it mimicks the look and feel of how documents are previewed on [github.com], and _does not_ imply any type of endorsement by, or affiliation to GitHub Inc. or any of its products --- it's "GitHub" as in "GitHubbish", or GitHub-style.

GITHUB® in an exclusive trademark registered in the United States by [GitHub, Inc.]
GITHUB® in an exclusive trademark registered in the United States by [GitHub, Inc.]
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

[github.com]: https://github.com/ "Visit github.com"
Expand All @@ -58,11 +58,11 @@ __CSS Styling__ --- This template supports styling for:

- all standard markdown elements
- [pandoc-flavoured markdown][Pandoc Markdown]
- [GitHub flavored markdown elements][GFM Features]
- [GitHub flavored markdown elements][GFM Features]
- some of [GitHub's Primer-CSS advanced styles][GitHub's Primer-CSS Features]
- PP Macros from the "__[Pandoc-Goodies PP-Macros Library]__" project

__Template Variables__ --- This template supports all the standard pandoc template variables, plus some [custom variables][Template Variables] for additional features (eg: `introduction` to show some text before the TOC, and `$toc-title$`).
__Template Variables__ --- This template supports all the standard pandoc template variables, plus some [custom variables][Template Variables] for additional features (eg: `introduction` to show some text before the TOC, and `$toc-title$`).

## Requirements

Expand Down Expand Up @@ -161,7 +161,7 @@ def fibo(int):
fibo_list.append(fibo_list[i-2]+fibo_list[i-1]);
return fibo_list;

print(fibo(100)); #Print list
print(fibo(100)); #Print list
```

::::::::: Alert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Expand Down Expand Up @@ -223,7 +223,7 @@ Alerts (aka _flash messages_) are borrowed/inspired from __Primer CSS__, the lib



### Creating Alerts Via Fenced-Divs
### Creating Alerts Via Fenced-Divs

This templates emulates Primer's Alerts via custom `<div>` classes (case-sensitive):

Expand Down Expand Up @@ -357,7 +357,7 @@ Therefore I thought that there might be other scenarios which might require over

!comment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REFERENCE LINKS DEFINITIONS
REFERENCE LINKS DEFINITIONS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[GitHub Pages]: https://pages.github.com/ "More info on GitHub Pages"
Expand All @@ -368,4 +368,4 @@ Therefore I thought that there might be other scenarios which might require over

[GitHub Alerts macros set]: https://github.com/tajmone/pandoc-goodies/tree/master/pp#github-alerts "More info about the Alerts macros set"

[fenced-divs]: http://pandoc.org/MANUAL.html#extension-fenced_divs "More info about pandoc fenced-divs syntax"
[fenced-divs]: http://pandoc.org/MANUAL.html#extension-fenced_divs "More info about pandoc fenced-divs syntax"

0 comments on commit c7963da

Please sign in to comment.