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: add alternative nue.yaml config filename #408

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

JensRoland
Copy link
Contributor

@JensRoland JensRoland commented Nov 16, 2024

I have submitted a JSON Schema describing the Nue site.yaml file to schemastore.org in order to get editor support for the Nue config (autoexpand and validation). However, since the site.yaml filename is generic, it is not ideal for file matching (needed for convenient auto-detection of the schema).

Thus, it would be nice to add an alternative filename, nue.yaml, which could be autodetected. I don't want to make a breaking change and propose changing it, but allowing both would work too.

This PR extends Nue to support either filename.

Update: The PR now simply adds a reference to the schema allowing editors to use it; and fixes a minor bug where readData would fail on missing path instead of returning.

Related: #407

@JensRoland JensRoland marked this pull request as draft November 16, 2024 21:09
@JensRoland JensRoland marked this pull request as ready for review November 16, 2024 21:49
@viktor-yakubiv
Copy link

It would be great if even the site.yaml was also configurable. As an example, using the following command line option (--config <path>):

nue --config nue.yaml serve

@JensRoland JensRoland force-pushed the feat/alternative-config-filename branch from c631c05 to e067014 Compare November 29, 2024 14:30
@JensRoland
Copy link
Contributor Author

I have removed the multi-filename code as discussed in the issue: #407

This PR should be ready to merge

@nobkd nobkd requested a review from tipiirai November 30, 2024 16:41
@tipiirai
Copy link
Contributor

tipiirai commented Dec 9, 2024

wow! I like this. nice work.

my only concern is how to keep the schema file up to date

@tipiirai tipiirai merged commit 8b457ff into nuejs:master Dec 9, 2024
4 checks passed
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.

3 participants