Skip to content
Permalink
Browse files

Refactor HTML assets to build/themes & build/plugins

Merges #168
Refs #163
  • Loading branch information...
vincerubinetti authored and dhimmel committed Jan 28, 2019
1 parent eb4cb3e commit fa7949f633ee819fd4724fcd1be6433acf2eb824
@@ -15,7 +15,6 @@ manubot process \

# pandoc settings
CSL_PATH=build/assets/style.csl
DOCX_PATH=build/assets/pandoc-reference.docx
BIBLIOGRAPHY_PATH=output/references.json
INPUT_PATH=output/manuscript.md

@@ -35,10 +34,10 @@ pandoc --verbose \
--csl=$CSL_PATH \
--metadata link-citations=true \
--mathjax \
--css=github-pandoc.css \
--include-in-header=build/assets/analytics.html \
--include-after-body=build/assets/anchors.html \
--include-after-body=build/assets/hypothesis.html \
--include-after-body=build/themes/default.html \
--include-after-body=build/plugins/analytics.html \
--include-after-body=build/plugins/anchors.html \
--include-after-body=build/plugins/hypothesis.html \
--output=output/manuscript.html \
$INPUT_PATH

@@ -59,7 +58,7 @@ if [ "$BUILD_PDF" != "false" ]; then
--csl=$CSL_PATH \
--metadata link-citations=true \
--webtex=https://latex.codecogs.com/svg.latex? \
--css=webpage/github-pandoc.css \
--include-after-body=build/themes/default.html \
--output=output/manuscript.pdf \
$INPUT_PATH
rm images
@@ -77,7 +76,7 @@ if [ "$BUILD_DOCX" = "true" ]; then
--bibliography=$BIBLIOGRAPHY_PATH \
--csl=$CSL_PATH \
--metadata link-citations=true \
--reference-doc=$DOCX_PATH \
--reference-doc=build/themes/default.docx \
--resource-path=.:content \
--output=output/manuscript.docx \
$INPUT_PATH
File renamed without changes.
@@ -1,3 +1,4 @@
<style>
/* From https://gist.github.com/dashed/6714393 with Manubot modifications */
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
@@ -1089,3 +1090,4 @@
.type-csharp .highlight .sc {
color: #a31515
}
</style>
@@ -139,12 +139,6 @@ def create_version(args):
dst=args.version_directory.joinpath(dst),
)

# Copy webpage/github-pandoc.css to to webpage/v/version/github-pandoc.css
shutil.copy2(
src=args.webpage_directory.joinpath('github-pandoc.css'),
dst=args.version_directory.joinpath('github-pandoc.css'),
)

# Create v/freeze to redirect to v/commit
path = pathlib.Path('build/assets/redirect-template.html')
redirect_html = path.read_text()

0 comments on commit fa7949f

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.