Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed May 25, 2020
1 parent 9f6dafe commit 41ca703
Show file tree
Hide file tree
Showing 10 changed files with 1,215 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.Rhistory
.RData
.Rproj.user
public
public2
2 changes: 1 addition & 1 deletion config/_default/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# hugo server --minify --themesDir ... --baseURL=https://0.0.0.0:1313/theme/hugo-book/

baseURL = ''
baseURL = 'https://hugo-pagedjs-book.netlify.app/'
title = 'Hugo Book'
theme = 'hugo-book'

Expand Down
3 changes: 1 addition & 2 deletions config/pdf/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
layoutDir = 'layouts-pdf'
title = 'PDF'
layoutDir = 'layouts-pdf'
1 change: 1 addition & 0 deletions config/website/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
layoutDir = 'layouts'

# Set source repository location.
# Used for 'Last Modified' and 'Edit this page' links.
Expand Down
11 changes: 5 additions & 6 deletions layouts-pdf/all/list.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<html>
<body>
<article>
<h1>Book</h1>
{{ .Site.Taxonomies }}
{{ $taxonomies := index .Site.Taxonomies .Page.Type }}
{{ range $taxonomies }}
<div><a href="{{ .Page.Permalink }}">{{ .Page.Title }} <sup>{{ .Count }}</sup></a></div>
{{ end }}
<h1>{{ .Site.Title }}</h1>
{{ range (where .Site.Pages "Section" "eq" .Site.Params.BookSection ) }}
<h2>{{ .Title }}</h2>
{{ .Content | markdownify }}
{{ end }}
</article>

</body>
Expand Down
2 changes: 2 additions & 0 deletions layouts-pdf/pageinpdf.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h2>{{ .Title }}</h2>
{{ .Content | markdownify }}
25 changes: 25 additions & 0 deletions layouts/menu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<nav>
{{ partial "docs/brand" . }}
{{ partial "docs/search" . }}
<ul><li>
<a href = "book.pdf">Get PDF</a>
</li>
</ul>
{{ partial "docs/inject/menu-before" . }}
{{ partial "docs/menu-hugo" .Site.Menus.before }}

{{ if .Site.Params.BookMenuBundle }}
{{ partial "docs/menu-bundle" . }}
{{ else }}
{{ partial "docs/menu-filetree" . }}
{{ end }}

{{ partial "docs/menu-hugo" .Site.Menus.after }}
{{ partial "docs/inject/menu-after" . }}
</nav>

<!-- Restore menu position as soon as possible to avoid flickering -->
{{ $script := resources.Get "menu-reset.js" | resources.Minify }}
{{ with $script.Content }}
<script>{{ . | safeJS }}</script>
{{ end }}
15 changes: 15 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[build]
publish = "/public"
command = "hugo -d public --environment 'website' && hugo -d public2 --environment 'pdf' && pagedjs-cli public2/all/index.html -o public/book.pdf"

[context.production.environment]
HUGO_VERSION = "0.70.0"

[context.deploy-preview.environment]
HUGO_VERSION = "0.70.0"

[context.deploy-preview]
command = "hugo -b $DEPLOY_PRIME_URL"

[context.branch-deploy]
command = "hugo -b $DEPLOY_PRIME_URL"
Loading

0 comments on commit 41ca703

Please sign in to comment.