Hi all,
I'm really excited about Soupault!
My posts are written in Markdown with YAML metadata, so I reached for
pandoc to preprocess them, as the manual proposes.
I'm using the `--standalone` option, so the output of pandoc contains an
`html` block. According to the documentation (and my `config.toml`), I
would assume that Soupault would put the output of pandoc as a complete
page, but in fact it's still inserted in the `main.html` template.
Has anyone encountered this before?
I would appreciate any help you can give me. Let me know if I can
provide any more details for troubleshooting.
Thanks for your attention!
Auguste
Hi Auguste,
You have found a bug.
I inadvertently broke the whole complete page functionality when I added
a fix for https://github.com/PataphysicalSociety/soupault/issues/58
The cause is that the default HTML parsing function can introduce
unfortunate corrections so I added a fixup
to force parsing of pages that may be templated in the "body fragment"
mode, without realizing that that mode
will delete <html> element if it's present to force the result to a
valid body fragment.
I've just pushed a fix:
https://codeberg.org/PataphysicalSociety/soupault/commit/3ca0981bca91df132ead049f8f7c3be32d56a63a
You can find more details about the issue in the comments there.
The solution, for now, involves parsing HTML twice, but from my quick
test, it adds only about 100ms
to the build time of the soupault.app website.
I still hope to find a clean solution later.
Do you have a build setup to build soupault from source?
If not, let me know what OS you use and I can make a test build for you
to test.
On 4/17/24 19:16, Auguste Baum wrote:
> Hi all,>> I'm really excited about Soupault!>> My posts are written in Markdown with YAML metadata, so I reached for > pandoc to preprocess them, as the manual proposes.>> I'm using the `--standalone` option, so the output of pandoc contains > an `html` block. According to the documentation (and my > `config.toml`), I would assume that Soupault would put the output of > pandoc as a complete page, but in fact it's still inserted in the > `main.html` template.>> Has anyone encountered this before?>> I would appreciate any help you can give me. Let me know if I can > provide any more details for troubleshooting.>> Thanks for your attention!>> Auguste>
As it turns out, I can't get it to build on my machine (NixOS). I get
this error:
```
File "src/soupault.ml", line 225, characters 22-51:
225 | let _interim_html = Html_utils.parse_html_default
~encoding:settings.page_character_encoding page_source in
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Unbound value Html_utils.parse_html_default
```
The build did succeed for the commit right before, though.
I'm sorry — I was quite tired and forgot to `git add` a file, so I had
to amend and force-push a fix.
Please pull from the repo and try again, and let me know if there are
any issues.
Also, FIY: I have a tiny feature in mind and a fix that is already
complete in OTOML,
then I can make a release since I have no other plans and the bug you've
found is serious enough
to warrant a release ASAP.
On 4/17/24 23:25, Auguste Baum wrote:
> As it turns out, I can't get it to build on my machine (NixOS). I get > this error:>> ```>> File "src/soupault.ml", line 225, characters 22-51:> 225 | let _interim_html = Html_utils.parse_html_default > ~encoding:settings.page_character_encoding page_source in> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^> Error: Unbound value Html_utils.parse_html_default>> ```>> The build did succeed for the commit right before, though.>
No apologies necessary at all!
It built and seems to have resolved the issue indeed. I'll be on the
lookout for the next release to distribute it for Nix users.
Thanks again and good night!
Auguste