How to use/change Params from Toml in Javascript

Hi @all,
how can i have access to the values of the Frontmatter (TOML) in my Javascript ‘main.js’?

i tried this:

<script type ="module".../>
import data from "./config.toml";

console.log('myTomlAccess: ', data);

I get of course Errors like - MIME-Type content-type “application/toml” … etc.

My purpose is to manipulate Values in my TOML-file with Javascript.

Thanks for your Help!

TOML is a simple text file. You can modify as text.

If you want more, must use toml2java parser / converter etc…

Ask google or other search engines for it -like

If you want more help, write more about your project … create a GitHub repo.
Your topic is not an HUGO issue, ask the JAVA community.

Good lock.

PS: must sleep over

You can use JSON to configure Hugo, buils a config.json

With JSON you are in the JAVA world. try

1 Like

Thanks for your efforts!