Jack000 / Expose

A simple static site generator for photoessays
MIT License
4.38k stars 255 forks source link

yaml makes text disappear in image #46

Open fabpicca opened 4 years ago

fabpicca commented 4 years ago

Hello, I'm new to expose but I already love it. I have a small issue. Reading the docs is possible to have some yaml vars in the text including custom variables to be used in a custom template. Now, I have my text file that looks like this:

`A train to somewhere?

title: new adventures textcolor: #ffffff ---`

I would expect to see the first line in the image and the part between '---' parsed as yaml. The results is that no text is displayed in the image. If I remove the yaml part

A train to somewhere?

I see text as expected in the image. I also tried removing the custom var "title" but the result is the same, if there's yaml section in the file the text is not displayed in the image.

Am I doing something wrong? Thanks!

coderofsalvation commented 3 years ago

I was struggling with this, until I did this:

in expose.sh (line 506) change:

metaline=$(echo "$text" | grep -n -m 2 -- "^---$" | tail -1 | cut -d ':' -f1)

into

metaline=$(echo "$text" | grep -n -m 2 -- "^---" | tail -1 | cut -d ':' -f1)

And then create a textfile like so:

---
top: 30
left: 5
width: 150
height: 120
textcolor: #000000
---
# Foo 

Dolor site ametttttttttttttt