You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.
Currently while we use Toml.ReadString(tomlContent), it will throw an exception if the toml file content has a less strict ordering. For example, here will throw an exception since params.plugins come before params .
baseURL = "http://example.org/"
languageCode = "en-us"
title = "My New Hugo Site"
theme = "ananke"
[params.plugins]
# CSS Plugins
[[params.plugins.css]]
URL = "plugins/bootstrap/bootstrap.min.css"
[params]
home = "Home"
I agree that logically it has no problem, params should come before params.plugins.
However, in some cases, we try to detect a Hugo app, we still want to identify this file as a valid toml file and get TomlTable from it, because it contains valid configurations for a Hugo app. The ordering is a user mistakes, not necessary to fail the build.
So wondering if it's possible to support it? Add a setting option for us to parse Toml file less strictly.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently while we use
Toml.ReadString(tomlContent)
, it will throw an exception if the toml file content has a less strict ordering. For example, here will throw an exception sinceparams.plugins
come beforeparams
.I agree that logically it has no problem,
params
should come beforeparams.plugins
.However, in some cases, we try to detect a Hugo app, we still want to identify this file as a valid toml file and get TomlTable from it, because it contains valid configurations for a Hugo app. The ordering is a user mistakes, not necessary to fail the build.
So wondering if it's possible to support it? Add a setting option for us to parse Toml file less strictly.
The text was updated successfully, but these errors were encountered: