Skip to content
Snippets Groups Projects
Verified Commit 0db8f8fa authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: commit save point

parent 577eb7a6
No related branches found
No related tags found
No related merge requests found
Showing with 338 additions and 412 deletions
......@@ -2,18 +2,24 @@ package document
import (
"bytes"
"crypto/md5"
"encoding/base64"
"fmt"
"github.com/PuerkitoBio/goquery"
"github.com/gomarkdown/markdown"
"github.com/gomarkdown/markdown/html"
"github.com/gomarkdown/markdown/parser"
"github.com/tdewolff/minify/v2"
minHTML "github.com/tdewolff/minify/v2/html"
"gitlab.schukai.com/oss/utilities/documentation-manager/environment"
"gitlab.schukai.com/oss/utilities/documentation-manager/translations"
"gitlab.schukai.com/oss/utilities/documentation-manager/utils"
"io/ioutil"
"log"
"os"
"path"
"path/filepath"
"regexp"
"strconv"
"strings"
"text/template"
......@@ -48,10 +54,12 @@ type SinglePageHtmlDataset struct {
CreatedFormat string // date format
Meta struct {
Title string
ShortTitle string
Description string
Keywords string
Language string
}
Version string
DocumentTree *Tree[DocumentNode]
TOC []DocumentNode
}
......@@ -111,7 +119,14 @@ func renderSinglePageHtml(env BuildHtmlEnvironment) error {
err = p.Execute(buf, d)
checkError(err)
err = ioutil.WriteFile(output, buf.Bytes(), 0644)
m := minify.New()
m.AddFunc("text/html", minHTML.Minify)
out := new(bytes.Buffer)
err = m.Minify("text/html", out, buf)
checkError(err)
err = ioutil.WriteFile(output, out.Bytes(), 0644)
checkError(err)
return nil
......@@ -177,6 +192,59 @@ func buildTree(body string) *Tree[DocumentNode] {
}
func getHtmlImages(content string, absolute string) (string, map[string]string) {
regEx := regexp.MustCompile(`(?P<match>\!\[(?P<label>[^]]*)\]\((?P<path>[^)]*)\))`)
matches := regEx.FindAllStringSubmatch(content, -1)
if matches == nil {
return content, nil
}
m := map[string]string{}
for _, match := range matches {
result := make(map[string]string)
for i, name := range regEx.SubexpNames() {
if i != 0 && name != "" {
result[name] = match[i]
}
}
if utils.IsUrl(result["path"]) {
continue
}
if filepath.IsAbs(result["path"]) {
continue
}
p := filepath.Join(absolute, result["path"])
path := path.Clean(p)
fc, err := ioutil.ReadFile(path)
if err != nil {
continue
}
data := "data:image/jpeg;base64," + base64.StdEncoding.EncodeToString(fc)
hash := fmt.Sprintf("%x", md5.Sum([]byte(data)))
m[hash] = data
content = strings.Replace(content, result["match"], "!["+result["label"]+"]("+hash+")", -1)
}
return content, m
}
func replaceImages(content string, images map[string]string) string {
for k, v := range images {
content = strings.Replace(content, k, v, -1)
}
return content
}
func NewHTMLDataset(env BuildHtmlEnvironment) (*SinglePageHtmlDataset, error) {
files, err := getFiles(env.SourcePath)
......@@ -190,9 +258,12 @@ func NewHTMLDataset(env BuildHtmlEnvironment) (*SinglePageHtmlDataset, error) {
d.Meta.Language = environment.State.GetHTMLMetaLanguage("")
d.Meta.Title = environment.State.GetHTMLMetaTitle("")
d.Meta.ShortTitle = environment.State.GetHTMLMetaShortTitle("")
d.Meta.Description = environment.State.GetHTMLMetaDescription("")
d.Meta.Keywords = environment.State.GetHTMLMetaKeywords("")
d.Version = environment.State.GetHTMLVersion("")
docs := []string{}
for _, key := range keys {
......@@ -203,17 +274,19 @@ func NewHTMLDataset(env BuildHtmlEnvironment) (*SinglePageHtmlDataset, error) {
text, s2Map := utils.MaskCodeBlocks(text, mapFiles[key].relSourcePath, 1)
text = convertHeadlines(text, mapFiles[key].level, mapFiles[key].textMeta.meta.Level)
//text = convertAwesomeBoxesToLatex(text)
text = convertImages(text, mapFiles[key].baseDir)
//text = convertCircledNumbersToLatex(text)
//text = replaceKbdToLatex(text)
//text = replaceRelativeLinksToLatex(text, mapFiles[key], mapFiles)
text, boxMap := convertAwesomeBoxesToHTML(text)
text, imgMap := getHtmlImages(text, mapFiles[key].baseDir)
text = replaceRelativeLinksToHTML(text, mapFiles[key], mapFiles)
text = utils.InsertCodeBlocks(text, s2Map)
text = utils.InsertCodeBlocks(text, s1Map)
text = createHtmlFromMarkdown(text)
text = replaceImages(text, imgMap)
text = replaceAwesomeBoxes(text, boxMap)
id := mapFiles[key].textMeta.meta.ID
if id == "" {
id = mapFiles[key].hash
......@@ -253,6 +326,124 @@ func NewHTMLDataset(env BuildHtmlEnvironment) (*SinglePageHtmlDataset, error) {
return d, nil
}
func convertAwesomeBoxesToHTML(content string) (string, map[string]string) {
regEx := regexp.MustCompile(`(?m)(?P<matches>!!!\s*(?P<type>[^\s]+)\s+?(?P<title>[^\n]*)\n(?P<lines>(?P<lastline>[[:blank:]]+[^\n]+\n)+))`)
matches := regEx.FindAllStringSubmatch(content, -1)
if matches == nil {
return content, nil
}
s := map[string]string{}
for _, match := range matches {
result := make(map[string]string)
for i, name := range regEx.SubexpNames() {
if i != 0 && name != "" {
result[name] = match[i]
}
}
boxtype := "note"
switch {
case utils.Contains([]string{"notebox", "note", "info"}, result["type"]):
boxtype = "primary"
case utils.Contains([]string{"tipbox", "tip", "hint"}, result["type"]):
boxtype = "secondary"
case utils.Contains([]string{"warningbox", "warning", "warn"}, result["type"]):
boxtype = "warning"
case utils.Contains([]string{"cautionbox", "caution", "danger"}, result["type"]):
boxtype = "danger"
case utils.Contains([]string{"importantbox", "important"}, result["type"]):
boxtype = "danger"
}
c := "<div class=\"alert alert-" + boxtype + "\" role=\"" + boxtype + "\">"
if result["title"] != "" {
c += "<strong class=\"alert-heading\">" + utils.TrimQuotes(result["title"]) + "</strong><br>"
}
lines := result["lines"]
c += lines
c += "</div>"
hash := fmt.Sprintf("box%x", md5.Sum([]byte(c)))
s[hash] = c
content = strings.Replace(content, result["matches"], "\n"+hash+"\n", 1)
}
return content, s
}
func replaceAwesomeBoxes(content string, boxMap map[string]string) string {
for k, v := range boxMap {
content = strings.Replace(content, k, v, -1)
}
return content
}
func replaceRelativeLinksToHTML(content string, f *SourceFile, fileMap SourceFileMap) string {
label := "link_" + f.hash
content = "<div id=\"" + label + "\"></div>\n" + strings.TrimSpace(content) + "\n"
regEx := regexp.MustCompile(`(?:^|[^!])(?P<match>\[(?P<label>[^]]*)\]\((?P<path>[^)]*)\))`)
matches := regEx.FindAllStringSubmatch(content, -1)
if matches == nil {
return content
}
for _, match := range matches {
result := make(map[string]string)
for i, name := range regEx.SubexpNames() {
if i != 0 && name != "" {
result[name] = match[i]
}
}
if filepath.IsAbs(result["path"]) {
continue
}
if utils.IsUrl(result["path"]) {
continue
}
d := filepath.Dir(f.relSourcePath)
p := filepath.Join(d, result["path"])
p = strings.Split(p, "#")[0]
ext := filepath.Ext(p)
if ext != ".md" && ext != ".markdown" {
environment.State.AddWarning(translations.T.Sprintf("file extension %s, in file %s, not supported for relative links", ext, f.absSourcePath))
continue
}
s := fileMap.findByRelativePath(p)
if s == nil {
environment.State.AddWarning(translations.T.Sprintf("relative path %s, in file %s, cannot be resolved", result["path"], f.absSourcePath))
continue
}
replace := "<a href=\"#link_" + s.hash + "\">" + result["label"] + "</a>"
content = strings.Replace(content, result["match"], replace, -1)
}
return content
}
func createHtmlFromMarkdown(text string) string {
htmlFlags := html.CommonFlags | html.HrefTargetBlank
opts := html.RendererOptions{
......
......@@ -14,32 +14,34 @@ const configFileName = "config.yaml"
type Configuration struct {
Document struct {
Path string `yaml:"Path" envconfig:"PATH"`
DateFormat string `yaml:"DateFormat" envconfig:"DATE_FORMAT"`
Path string `yaml:"Path" env:"PATH"`
Version string `yaml:"Version" env:"VERSION"`
DateFormat string `yaml:"DateFormat" env:"DATE_FORMAT"`
Add struct {
Template string `yaml:"Template" envconfig:"NEW_TEMPLATE"`
Template string `yaml:"Template" env:"NEW_TEMPLATE"`
}
Build struct {
//Path string `yaml:"Path" envconfig:"BUILD_PATH"`
//Path string `yaml:"Path" env:"BUILD_PATH"`
} `yaml:"Build"`
PDF struct {
Output string `yaml:"Output" envconfig:"PDF_OUTPUT"`
Output string `yaml:"Output" env:"PDF_OUTPUT"`
Templates struct {
Latex string `yaml:"Latex" envconfig:"PDF_LATEX_TEMPLATE"`
Markdown string `yaml:"Markdown" envconfig:"PDF_MARKDOWN_TEMPLATE"`
Latex string `yaml:"Latex" env:"PDF_LATEX_TEMPLATE"`
Markdown string `yaml:"Markdown" env:"PDF_MARKDOWN_TEMPLATE"`
} `yaml:"Templates"`
} `yaml:"PDF"`
HTML struct {
Output string `yaml:"Output" envconfig:"HTML_OUTPUT"`
SinglePage bool `yaml:"SinglePage" envconfig:"HTML_SINGLEPAGE"`
Output string `yaml:"Output" env:"HTML_OUTPUT"`
SinglePage bool `yaml:"SinglePage" env:"HTML_SINGLEPAGE"`
Templates struct {
HTML string `yaml:"HTML" envconfig:"HTML_HTML_TEMPLATE"`
HTML string `yaml:"HTML" env:"HTML_HTML_TEMPLATE"`
} `yaml:"Templates"`
Meta struct {
Title string `yaml:"Title" envconfig:"HTML_TITLE"`
Description string `yaml:"Description" envconfig:"HTML_DESCRIPTION"`
Keywords string `yaml:"Keywords" envconfig:"HTML_KEYWORDS"`
Language string `yaml:"Language" envconfig:"HTML_LANGUAGE"`
Title string `yaml:"Title" env:"HTML_TITLE"`
ShortTitle string `yaml:"Short-Title" env:"HTML_SHORT_TITLE"`
Description string `yaml:"Description" env:"HTML_DESCRIPTION"`
Keywords string `yaml:"Keywords" env:"HTML_KEYWORDS"`
Language string `yaml:"Language" env:"HTML_LANGUAGE"`
} `yaml:"Meta"`
} `yaml:"HTML"`
} `yaml:"Document"`
......
......@@ -35,6 +35,18 @@ func (e *stateStruct) GetHTMLMetaTitle(arg string) string {
return "documentation"
}
func (e *stateStruct) GetHTMLMetaShortTitle(arg string) string {
if arg != "" {
return arg
}
if e.configuration.Document.HTML.Meta.ShortTitle != "" {
return e.configuration.Document.HTML.Meta.ShortTitle
}
return "documentation"
}
func (e *stateStruct) GetHTMLMetaLanguage(arg string) string {
if arg != "" {
return arg
......@@ -71,6 +83,18 @@ func (e *stateStruct) GetHTMLMetaKeywords(arg string) string {
return ""
}
func (e *stateStruct) GetHTMLVersion(arg string) string {
if arg != "" {
return arg
}
if e.configuration.Document.Version != "" {
return e.configuration.Document.Version
}
return ""
}
func (e *stateStruct) GetDocumentHTMLOutputPath(arg string) string {
if arg != "" {
return arg
......
......@@ -3,26 +3,29 @@ module gitlab.schukai.com/oss/utilities/documentation-manager
go 1.18
require (
github.com/PuerkitoBio/goquery v1.8.0
github.com/evanw/esbuild v0.14.49
github.com/gomarkdown/markdown v0.0.0-20220627144906-e9a81102ebeb
github.com/gookit/color v1.5.1
github.com/jessevdk/go-flags v1.5.0
github.com/kelseyhightower/envconfig v1.4.0
github.com/sethvargo/go-envconfig v0.8.0
golang.org/x/text v0.3.7
gopkg.in/yaml.v3 v3.0.1
)
require (
github.com/PuerkitoBio/goquery v1.8.0 // indirect
github.com/andybalholm/cascadia v1.3.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/go-chi/chi/v5 v5.0.7 // indirect
github.com/go-chi/docgen v1.2.0 // indirect
github.com/go-chi/httprate v0.5.3 // indirect
github.com/gomarkdown/markdown v0.0.0-20220627144906-e9a81102ebeb // indirect
github.com/sethvargo/go-envconfig v0.8.0 // indirect
github.com/tdewolff/minify/v2 v2.12.0 // indirect
github.com/tdewolff/parse/v2 v2.6.1 // indirect
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.21.0 // indirect
golang.org/x/net v0.0.0-20210916014120-12bc252f5db8 // indirect
golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d // indirect
golang.org/x/net v0.0.0-20220708220712-1185a9018129 // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
)
......@@ -5,8 +5,14 @@ github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEq
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/evanw/esbuild v0.14.49 h1:jpZ/ut75socKiFF2XWSzjTAVAQP7IkRvrkLFaIb/Ueg=
github.com/evanw/esbuild v0.14.49/go.mod h1:GG+zjdi59yh3ehDn4ZWfPcATxjPDUH53iU4ZJbp7dkY=
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
github.com/go-chi/chi/v5 v5.0.1/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-chi/chi/v5 v5.0.7 h1:rDTPXLDHGATaeHvVlLcR4Qe0zftYethFucbjVQ1PxU8=
github.com/go-chi/chi/v5 v5.0.7/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
......@@ -26,14 +32,22 @@ github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sethvargo/go-envconfig v0.8.0 h1:AcmdAewSFAc7pQ1Ghz+vhZkilUtxX559QlDuLLiSkdI=
github.com/sethvargo/go-envconfig v0.8.0/go.mod h1:Iz1Gy1Sf3T64TQlJSvee81qDhf7YIlt8GMUX6yyNFs0=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
github.com/tdewolff/minify/v2 v2.12.0 h1:ZyvMKeciyR3vzJrK/oHyBcSmpttQ/V+ah7qOqTZclaU=
github.com/tdewolff/minify/v2 v2.12.0/go.mod h1:8mvf+KglD7XurfvvFZDUYvVURy6bA/r0oTvmakXMnyg=
github.com/tdewolff/parse/v2 v2.6.1 h1:RIfy1erADkO90ynJWvty8VIkqqKYRzf2iLp8ObG174I=
github.com/tdewolff/parse/v2 v2.6.1/go.mod h1:WzaJpRSbwq++EIQHYIRTpbYKNA3gn9it1Ik++q4zyho=
github.com/tdewolff/test v1.0.6/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/tdewolff/test v1.0.7/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8=
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
......@@ -56,6 +70,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210916014120-12bc252f5db8 h1:/6y1LfuqNuQdHAm0jjtPtgRcxIxjVZgm5OTu8/QhZvk=
golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220708220712-1185a9018129 h1:vucSRfWwTsoXro7P+3Cjlr6flUMtzCwzlvkxEQtHHB0=
golang.org/x/net v0.0.0-20220708220712-1185a9018129/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
......@@ -66,12 +82,16 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44 h1:Bli41pIlzTzf3KEY06n+xnzK/
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220702020025-31831981b65f h1:xdsejrW/0Wf2diT5CPp3XmKUNbr7Xvw8kYilQ+6qjRY=
golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e h1:CsOuNlbOuf0mzxJIefr6Q4uAUetRUwZE4qt7VfzP+xo=
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d h1:/m5NbqQelATgoSPVC2Z23sR4kVNokFwDDyWh/3rGY+I=
golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -2,6 +2,7 @@
Document:
Path: ../doc/
Version: 1.0
HTML:
Output: ../build/index.html
SinglePage: true
......@@ -9,6 +10,7 @@ Document:
HTML: ../templates/html/index.html
Meta:
Title: "Example 3"
Short-Title: "Short Title"
Description: "Example 3"
Keywords: "Example 3"
Language: "de"
## Sonderzeichen
➊ ➋ ➌ ➍ ➎ ➏ ➐ ➑ ➒ ➓ ⓫ ⓬ ⓭ ⓮ ⓯ ⓰ ⓱ ⓲ ⓳ ⓴
\ No newline at end of file
development/examples/example3/doc/01/img/file41021.jpg

1.71 MiB

......@@ -21,8 +21,19 @@ Language: de
# Titel 1 (level1)
Lorem Ipsum is simply **dummy** text of the printing and typesetting industry.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
!!! note "Titel 1"
Das ist eine Note
und noch eine zeile
![](01/img/file41021.jpg)
YES
Lorem Ipsum is simply **dummy** text of the printing and typesetting industry.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
## Titel 2 (level2)
......
# Funktionen
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard
dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently
with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Das ist eine absolute Verlinkung [example.com](https://example.com) und das eine relative auf einen
Unterordner [01/a.md](01/a.md).
**Tastatureingabe**
To switch directories, type <kbd>cd</kbd> followed by the name of the directory.<br>
To edit settings, press <kbd><kbd>ctrl</kbd> + <kbd>,</kbd></kbd>
# N1
......@@ -13,6 +13,14 @@
<link rel="stylesheet" type="text/css" href="assets/vendor/highlight.js/styles/github.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/stylesheet.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/color-red.css"/>
<style>
img {
max-width: 95%;
}
</style>
</head>
<body data-spy="scroll" data-target=".idocs-navigation" data-offset="125">
......@@ -28,27 +36,18 @@
</div>
<!-- Preloader End -->
<!-- Document Wrapper
=============================== -->
<div id="main-wrapper">
<!-- Header
============================ -->
<header id="header" class="sticky-top">
<!-- Navbar -->
<nav class="primary-menu navbar navbar-expand-lg navbar-dropdown-dark">
<div class="container-fluid">
<!-- Sidebar Toggler -->
<button id="sidebarCollapse" class="navbar-toggler d-block d-md-none" type="button"><span></span><span
class="w-75"></span><span class="w-50"></span></button>
<!-- Logo -->
<a class="logo ml-md-3" href="index.html" title="Home"> <img
src="https://cdn.alvine.io/image/logo/schukai-rot.svg" width="100" alt="schukai Logo"/> </a>
<span class="text-2 ml-4">v1.0</span>
<!-- Logo End -->
<span class="text-1 ml-4"><div style="display: flex;align-items: center;">{{ .Meta.ShortTitle }}<span class="ml-1 badge badge-primary">{{ .Version }}</span></div></span>
<!-- Navbar Toggler -->
<button class="navbar-toggler ml-auto" type="button" data-toggle="collapse" data-target="#header-nav">
<span></span><span></span><span></span></button>
......@@ -62,33 +61,10 @@
</li>
</ul>
</div>
<!-- <ul class="social-icons social-icons-sm ml-lg-2 mr-2">-->
<!-- <li class="social-icons-twitter"><a data-toggle="tooltip"-->
<!-- href="https://twitter.com/schukaiGmbH" target="_blank"-->
<!-- title="" data-original-title="Twitter"><i-->
<!-- class="fab fa-twitter"></i></a></li>-->
<!-- <li class="social-icons-devto"><a data-toggle="tooltip"-->
<!-- href="https://dev.to/schukai" target="_blank"-->
<!-- title="" data-original-title="Dev.to"><i-->
<!-- class="fab fa-dev"></i></a></li>-->
<!-- <li class="social-icons-linkedin"><a data-toggle="tooltip"-->
<!-- href="https://www.linkedin.com/company/schukai-gmbh/?"-->
<!-- target="_blank"-->
<!-- title="" data-original-title="Dribbble"><i-->
<!-- class="fab fa-linkedin"></i></a></li>-->
<!-- </ul>-->
</div>
</nav>
<!-- Navbar End -->
</header>
<!-- Header End -->
<!-- Content
============================ -->
<div id="content" role="main">
<!-- Sidebar Navigation
============================ -->
<div class="idocs-navigation bg-light">
{{if .DocumentTree }}
<ul class="nav flex-column ">
......@@ -115,8 +91,6 @@
</div>
<!-- Docs Content
============================ -->
<div class="idocs-content">
<div class="container">
......@@ -131,10 +105,6 @@
</div>
</div>
<!-- Content end -->
<!-- Footer
============================ -->
<footer id="footer" class="section bg-dark footer-text-light">
<section class="mt-5 d-print-none">
......@@ -212,25 +182,16 @@
</footer>
<!-- Footer end -->
</div>
<!-- Document Wrapper end -->
<!-- Back To Top -->
<a id="back-to-top" data-toggle="tooltip" title="Back to Top" href="javascript:void(0)"><i class="fa fa-chevron-up"></i></a>
<!-- JavaScript
============================ -->
<script src="assets/vendor/jquery/jquery.min.js"></script>
<script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Highlight JS -->
<script src="assets/vendor/highlight.js/highlight.min.js"></script>
<!-- Easing -->
<script src="assets/vendor/jquery.easing/jquery.easing.min.js"></script>
<!-- Magnific Popup -->
<script src="assets/vendor/magnific-popup/jquery.magnific-popup.min.js"></script>
<!-- Custom Script -->
<script src="assets/js/theme.js"></script>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment