vector to work with
This commit is contained in:
@@ -11,10 +11,10 @@ RUN groupadd --gid 1000 flammenderberg && \
|
||||
WORKDIR /weltraum
|
||||
RUN mkdir stories && mkdir export
|
||||
COPY ./cyoa-engine ./
|
||||
ADD ./templates templates
|
||||
ADD ./templates/template.html ./
|
||||
|
||||
RUN chown -R hexenmeister:flammenderberg /weltraum
|
||||
|
||||
EXPOSE 3344
|
||||
|
||||
CMD ["/weltraum/cyoa-engine", "dir ./stories/", "out ./export/", "temp ./templates/", "serve true", "port 3344"]
|
||||
CMD ["/weltraum/cyoa-engine", "dir ./stories/", "serve", "port 3344"]
|
||||
|
||||
@@ -14,3 +14,7 @@ go build -o cyoa-engine main.go
|
||||
# baue das docker image
|
||||
|
||||
docker build -t asciidoctor-echo -f Dockerfile.echobox .
|
||||
|
||||
|
||||
# run with test volumes
|
||||
docker run --rm -v "$(pwd)/stories:/weltraum/stories" -v "$(pwd)/export:/weltraum/export" -p "6699:3344" asciidoctor-echo ./cyoa-engine -dir ./stories/ -serve -port 3344
|
||||
|
||||
@@ -238,6 +238,7 @@ func getTemplateFuncMap() template.FuncMap {
|
||||
}
|
||||
|
||||
func generateHTMLFile(g *StoryGraph, outPath string, tmplPath string) error {
|
||||
fmt.Println("tmp path "+tmplPath)
|
||||
tmpl, err := template.New(filepath.Base(tmplPath)).Funcs(getTemplateFuncMap()).ParseFiles(tmplPath)
|
||||
if err != nil { return fmt.Errorf("Template-Fehler: %v", err) }
|
||||
f, err := os.Create(outPath)
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
|
||||
try {
|
||||
const rawData = document.getElementById('story-data').textContent.trim();
|
||||
if (!rawData.startsWith('{{')) {
|
||||
if (!rawData.startsWith("\{\{")) {
|
||||
storyData = JSON.parse(rawData);
|
||||
} else {
|
||||
console.warn("[WARNUNG] Go-Engine nicht verbunden. Lade Offline-Preview.");
|
||||
|
||||
Reference in New Issue
Block a user