Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
purr-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonathan Wilkes
purr-data
Commits
9bf65e1f
Commit
9bf65e1f
authored
2 years ago
by
Albert Gräf
Browse files
Options
Downloads
Patches
Plain Diff
Switch from pandoc to python-markdown + sed.
parent
aa965d2f
No related branches found
Branches containing commit
No related tags found
1 merge request
!835
Add document generation for ReadMe.html and Welcome.html
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/gendoc/Makefile
+9
-25
9 additions, 25 deletions
packages/gendoc/Makefile
packages/gendoc/pandoc-template.html
+27
-0
27 additions, 0 deletions
packages/gendoc/pandoc-template.html
with
36 additions
and
25 deletions
packages/gendoc/Makefile
+
9
−
25
View file @
9bf65e1f
...
@@ -8,29 +8,9 @@ $(addprefix Welcome-, Linux Darwin MINGW)
...
@@ -8,29 +8,9 @@ $(addprefix Welcome-, Linux Darwin MINGW)
markdown
=
$(
addsuffix .md,
$(
targets
))
markdown
=
$(
addsuffix .md,
$(
targets
))
html
=
$(
addsuffix .html,
$(
targets
))
html
=
$(
addsuffix .html,
$(
targets
))
# Note: This requires special tools (p
andoc
, awk).
# Note: This requires special tools (p
ython-markdown
, awk).
all
:
html
all
:
html
# Check for the official Pandoc package on Windows, so that make will find it.
ifneq
(,$(wildcard /c/Program\ Files/Pandoc/pandoc.exe))
pandoc
=
/c/Program
\
Files/Pandoc/pandoc
else
pandoc
=
pandoc
endif
# NOTE: In pandoc 2.19, --self-contained, which forces the css to be included
# in the html output, is deprecated in favour of --embed-resources. But the
# new option isn't supported in pandoc 2.18, which is still being used a
# lot. Brilliant. For now we just live with the deprecation warning. You can
# always set different options using the self-contained variable from the
# command line if needed.
# >=2.19:
#self-contained = --standalone --embed-resources
# <=2.18:
self-contained
=
--self-contained
markdown
:
$(markdown)
markdown
:
$(markdown)
html
:
$(html)
html
:
$(html)
...
@@ -39,16 +19,20 @@ ReadMe-%.md: ReadMe.md
...
@@ -39,16 +19,20 @@ ReadMe-%.md: ReadMe.md
awk
-f
gendoc.awk
osname
=
"
$(
osname
)
"
version
=
"
$(
version
)
"
build_version
=
"
$(
build_version
)
"
<
$<
>
$@
awk
-f
gendoc.awk
osname
=
"
$(
osname
)
"
version
=
"
$(
version
)
"
build_version
=
"
$(
build_version
)
"
<
$<
>
$@
ReadMe-%.html
:
osname = $(patsubst ReadMe-%.html
,
%
,
$@)
ReadMe-%.html
:
osname = $(patsubst ReadMe-%.html
,
%
,
$@)
ReadMe-%.html
:
ReadMe-%.md
ReadMe-%.html
:
ReadMe-%.md pandoc-template.html
$(
pandoc
)
$<
-o
$@
-M
pagetitle
=
"Purr Data
$(
version
)
(
$(
osname
)
)"
$(
self-contained
)
--css
gh-pandoc.css
python
-m
markdown
$<
>
ReadMe-body.html
sed
-e
"s/@version@/
$(
version
)
(
$(
osname
)
)/g"
-e
'/--stylesheet--/r gh-pandoc.css'
-e
'/--body--/r ReadMe-body.html'
pandoc-template.html
>
$@
rm
-f
ReadMe-body.html
Welcome-%.md
:
osname = $(patsubst Welcome-%.md
,
%
,
$@)
Welcome-%.md
:
osname = $(patsubst Welcome-%.md
,
%
,
$@)
Welcome-%.md
:
Welcome.md
Welcome-%.md
:
Welcome.md
awk
-f
gendoc.awk
osname
=
"
$(
osname
)
"
version
=
"
$(
version
)
"
build_version
=
"
$(
build_version
)
"
<
$<
>
$@
awk
-f
gendoc.awk
osname
=
"
$(
osname
)
"
version
=
"
$(
version
)
"
build_version
=
"
$(
build_version
)
"
<
$<
>
$@
Welcome-%.html
:
osname = $(patsubst Welcome-%.html
,
%
,
$@)
Welcome-%.html
:
osname = $(patsubst Welcome-%.html
,
%
,
$@)
Welcome-%.html
:
Welcome-%.md
Welcome-%.html
:
Welcome-%.md pandoc-template.html
$(
pandoc
)
$<
-o
$@
-M
pagetitle
=
"Purr Data
$(
version
)
(
$(
osname
)
)"
$(
self-contained
)
--css
gh-pandoc.css
python
-m
markdown
$<
>
Welcome-body.html
sed
-e
"s/@version@/
$(
version
)
(
$(
osname
)
)/g"
-e
'/--stylesheet--/r gh-pandoc.css'
-e
'/--body--/r Welcome-body.html'
pandoc-template.html
>
$@
rm
-f
Welcome-body.html
clean
:
clean
:
rm
-f
$(
markdown
)
$(
html
)
rm
-f
$(
markdown
)
$(
html
)
This diff is collapsed.
Click to expand it.
packages/gendoc/pandoc-template.html
0 → 100644
+
27
−
0
View file @
9bf65e1f
<!DOCTYPE html>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang
xml:lang
>
<head>
<meta
charset=
"utf-8"
/>
<meta
name=
"generator"
content=
"pandoc"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, user-scalable=yes"
/>
<title>
Purr Data @version@
</title>
<style>
code
{
white-space
:
pre-wrap
;}
span
.smallcaps
{
font-variant
:
small-caps
;}
span
.underline
{
text-decoration
:
underline
;}
div
.column
{
display
:
inline-block
;
vertical-align
:
top
;
width
:
50%
;}
div
.hanging-indent
{
margin-left
:
1.5em
;
text-indent
:
-1.5em
;}
ul
.task-list
{
list-style
:
none
;}
.display.math
{
display
:
block
;
text-align
:
center
;
margin
:
0.5rem
auto
;}
</style>
<style
type=
"text/css"
>
<!
--stylesheet--
>
</style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<!--body-->
</body>
</html>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment