work in progress: output formats tpl, htmx, pt
This commit is contained in:
parent
cad1c3e9b6
commit
c62ebb9796
8 changed files with 110 additions and 0 deletions
22
config.yaml
Normal file
22
config.yaml
Normal file
|
@ -0,0 +1,22 @@
|
|||
mediaTypes:
|
||||
x-text/html-fragment:
|
||||
suffixes:
|
||||
- htmx
|
||||
x-text/go-template:
|
||||
suffixes:
|
||||
- tpl
|
||||
x-text/zope-pagetemplate:
|
||||
suffixes:
|
||||
- pt
|
||||
|
||||
outputFormats:
|
||||
html-fragment:
|
||||
isPlainText: false
|
||||
mediaType: x-text/html-fragment
|
||||
tpl:
|
||||
isPlainText: false
|
||||
mediaType: x-text/go-template
|
||||
zpt:
|
||||
baseName: main
|
||||
isPlainText: false
|
||||
mediaType: x-text/zope-pagetemplate
|
34
layouts/_default/home.zpt.pt
Normal file
34
layouts/_default/home.zpt.pt
Normal file
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{{ if .Site.Params.favicon -}}
|
||||
<link rel="icon" href="{{ .Site.BaseURL }}img/{{ .Site.Params.favicon }}">
|
||||
{{- end }}
|
||||
{{ $title := or (i18n .Title) .Title .Site.Title -}}
|
||||
<title>{{ $title }}{{ if ne $title .Site.Title }} - {{ .Site.Title }}{{ end }}</title>
|
||||
{{ hugo.Generator }}
|
||||
{{ $main := resources.Get "sass/main.scss" | toCSS | minify -}}
|
||||
<link rel="stylesheet" href="{{ $main.Permalink }}">
|
||||
{{ with .OutputFormats.Get "rss" -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
{{ block "config" . }}{{ end }}
|
||||
</head>
|
||||
<body>
|
||||
{{ $header := or .Site.Params.layouts.partials.header "header" }}
|
||||
{{ partial $header . }}
|
||||
<div class="container">
|
||||
<div class="wrapper">
|
||||
{{ block "main" . }} {{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ partial "footer.html" . }}
|
||||
<script src="{{ .Site.BaseURL }}js/bootstrap.bundle.min.js"></script>
|
||||
{{ partial "js.html" . }}
|
||||
{{ block "appjs" . }} {{ end }}
|
||||
</body>
|
||||
</html>
|
||||
|
2
layouts/_default/list.html-fragment.htmx
Normal file
2
layouts/_default/list.html-fragment.htmx
Normal file
|
@ -0,0 +1,2 @@
|
|||
{{- partial "content" . -}}
|
||||
|
2
layouts/_default/list.tpl.tpl
Normal file
2
layouts/_default/list.tpl.tpl
Normal file
|
@ -0,0 +1,2 @@
|
|||
{{- partial "content" . -}}
|
||||
|
2
layouts/_default/single.html-fragment.htmx
Normal file
2
layouts/_default/single.html-fragment.htmx
Normal file
|
@ -0,0 +1,2 @@
|
|||
{{- partial "content" . -}}
|
||||
|
2
layouts/_default/single.tpl.tpl
Normal file
2
layouts/_default/single.tpl.tpl
Normal file
|
@ -0,0 +1,2 @@
|
|||
{{- partial "content" . -}}
|
||||
|
|
@ -38,6 +38,12 @@ frontmatter:
|
|||
related:
|
||||
_merge: shallow
|
||||
|
||||
mediaTypes:
|
||||
_merge: shallow
|
||||
|
||||
outputs:
|
||||
home: [html, html-fragment, tpl]
|
||||
|
||||
menu:
|
||||
main:
|
||||
- identifier: home
|
||||
|
|
40
sites/pt/config.yaml
Normal file
40
sites/pt/config.yaml
Normal file
|
@ -0,0 +1,40 @@
|
|||
baseurl: /docs/scopes/pt/
|
||||
DefaultContentLanguage: en
|
||||
title: cyberscopes example site
|
||||
summary: Generate main.pt for Zope applications
|
||||
paginate: 6
|
||||
theme:
|
||||
- cyberscopes
|
||||
- cybercards
|
||||
themesDir: themes
|
||||
|
||||
params:
|
||||
|
||||
logo: cc-logo.png
|
||||
favicon: icon-star-bl.png
|
||||
|
||||
github: https://github.com/cyberconcepts
|
||||
sourcehut: https://git.sr.ht/~cco
|
||||
email: helmutm@cy55.de
|
||||
|
||||
copyright:
|
||||
name: Helmut Merz
|
||||
link: https://www.cyberconcepts.org
|
||||
|
||||
api:
|
||||
module: main-htmx.ts
|
||||
|
||||
taxonomies: []
|
||||
|
||||
frontmatter:
|
||||
_merge: shallow
|
||||
|
||||
related:
|
||||
_merge: shallow
|
||||
|
||||
mediaTypes:
|
||||
_merge: shallow
|
||||
|
||||
outputs:
|
||||
home: [zpt]
|
||||
|
Loading…
Add table
Reference in a new issue