Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: something other than yaml #187

Open
MatthewCroughan opened this issue Dec 24, 2024 · 3 comments
Open

feat: something other than yaml #187

MatthewCroughan opened this issue Dec 24, 2024 · 3 comments
Labels
help wanted Extra attention is needed LOW

Comments

@MatthewCroughan
Copy link

Can we configure this using toml or json or something? This makes it easier to write configurations from other languages.

@rochacbruno
Copy link
Owner

Hi @MatthewCroughan what exactly is the use case for writing the config from other langs?

We can add support for other formats, I am happy to take a PR

The significant lines are

marmite/src/site.rs

Lines 39 to 45 in e72ec83

let site: Marmite = match serde_yaml::from_str::<Marmite>(config_content) {
Ok(site) => site,
Err(e) => {
error!("Failed to parse config YAML: {}", e);
process::exit(1);
}
};

@MatthewCroughan
Copy link
Author

MatthewCroughan commented Dec 26, 2024

@rochacbruno in my case it would be nice to be able to use the Nix language to instruct marmite what to do, in order to generate static sites that live in the /nix/store and are produced by Ci and Nix functions. Nix functions that generate json/toml are easy, but yml not so much.

@rochacbruno
Copy link
Owner

Most of the config parameters can be passed via CLI

$ marmite path/to/folder --generate-config \
   --name MySite --tagline "Awesome website" --url mysite.com ...

This will generate a marmite.yaml on the path/to/folder

@rochacbruno rochacbruno added help wanted Extra attention is needed LOW labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed LOW
Projects
None yet
Development

No branches or pull requests

2 participants