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

Add new SSG Feature: Support --config with Config File #15

Merged
merged 2 commits into from Oct 6, 2021

Conversation

MizuhoOkimoto
Copy link
Contributor

@MizuhoOkimoto MizuhoOkimoto commented Oct 6, 2021

This is fixes #14
I've added a new feature that supports a config file, so if users want to be able to specify all of their SSG options in a JSON formatted configuration file instead of having to pass them all as command-line arguments every time.
Specifically, I added yargs option which is -c, --config, and readFileSync function on the textToHTML.js file.
Also, I added the following config file:
./ssg-config.json

{
    "input": "./site",
    "output": "./build",
    "stylesheet": "https://cdn.jsdelivr.net/npm/water.css@2/out/water.css",
    "lang": "fr"
}

Please let me know if you want any changes or anything I can improve.
Thank you for considering.

@AndreWillomitzer
Copy link
Owner

Please edit the readME file with details about config support and examples showing how to use it.

@MizuhoOkimoto MizuhoOkimoto marked this pull request as ready for review October 6, 2021 01:47
@AndreWillomitzer AndreWillomitzer merged commit bfefbfa into AndreWillomitzer:main Oct 6, 2021
@MizuhoOkimoto
Copy link
Contributor Author

I added 2 lines to README.md file based on the new features which are the Example and Features sections.
Please review it and let me know if I need to improve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add new SSG Feature: Support --config with Config File
2 participants