theme renderer

This commit is contained in:
menduz 2022-10-03 12:14:02 -03:00
parent 37b9ae824d
commit 3ee7afcb69
No known key found for this signature in database
GPG Key ID: 78AC067F75AC1B64
7 changed files with 295 additions and 7 deletions

View File

@ -1,7 +1,7 @@
# hugo server --minify --themesDir ... --baseURL=http://0.0.0.0:1313/theme/hugo-book/
baseURL = 'https://example.com/'
title = 'Hugo Book'
baseURL = 'https://documentation-theme.pages.dev/'
title = 'Decentraland Documentation'
theme = 'documentation-theme'
# Book configuration

2
go.mod
View File

@ -1,3 +1,3 @@
module github.com/alex-shpak/hugo-book
module github.com/decentraland/documentation-theme
go 1.16

View File

@ -4,4 +4,4 @@
{{ . | $.Page.RenderString }}
</div>
{{ end }}
</div>
</div>

View File

@ -0,0 +1,13 @@
{{ warnf "Expand shortcode is deprecated. Use 'details' instead." }}
<div class="book-expand">
<label>
<div class="book-expand-head flex justify-between">
<span>{{ default (i18n "Expand") (.Get 0) }}</span>
<span>{{ default "↕" (.Get 1) }}</span>
</div>
<input type="checkbox" class="hidden" />
<div class="book-expand-content markdown-inner">
{{ .Inner | markdownify }}
</div>
</label>
</div>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"Target":"book.min.ac322ad916b031cdbbc06969f65f151f2aa7d436ff20c63971985257f5c12e61.css","MediaType":"text/css","Data":{"Integrity":"sha256-rDIq2RawMc27wGlp9l8VHyqn1Db/IMY5cZhSV/XBLmE="}}

View File

@ -1,11 +1,11 @@
# theme.toml template for a Hugo theme
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
name = "Book"
name = "Decentraland Theme"
license = "MIT"
licenselink = "https://github.com/alex-shpak/hugo-book/blob/master/LICENSE"
licenselink = "https://github.com/decentraland/documentation-theme/blob/master/LICENSE"
description = "Hugo documentation theme as simple as plain book"
homepage = "https://github.com/alex-shpak/hugo-book"
homepage = "https://github.com/decentraland/documentation-theme"
demosite = "https://hugo-book-demo.netlify.app"
tags = ["responsive", "clean", "documentation", "docs", "flexbox", "search", "mobile", "multilingual", "disqus"]
features = []