-
Notifications
You must be signed in to change notification settings - Fork 10
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
index.md is needed when creating nested directories (aka should greenwood have template defaults?) #120
Comments
this kind of brings up a more interesting debate i've been revisiting; whether or not Greenwood should include default pages and templates (aside from the app shell; index.html and app-template.js). Essentially it is the debate of explicit vs implicit. Currently that pages and templates are provided by default is essentially an implicit support. Some might argue that it is better to be explicit in that if pages/ and page-template.js are missing, Greenwood should make that clear in the error message. The message could easily link to the API or Getting Started docs on the website. I think it comes down to this: is it really that likely that someone will install Greenwood to not create their own content? Why even support all that code and logic if not needed. We have all the test cases anyway so adapting and filling in the gaps should be super easy. |
Interesting question, if using an external data source (#21 ), could we do away with the need to having any local markdown? 🤔 |
Or we should just add something about this to the documentation and make sure it is explicit for users. |
I think this is taken care of as part of #355 |
no longer an issue, solved as part of |
Type of Change
Summary
Related to this test case
https://github.com/ProjectEvergreen/greenwood/blob/master/test/cli/cases/build.default.workspace-nested/build.default.workspace-nested.spec.js#L27
I guess the question / bug is: should Greenwood generate a default index.html for the user?
I think the answer would be yes, but I suppose, if the user is making nested directories, wouldn't at that point having a home page make sense?
Details
For reference, here is the error when deleting that file and running
yarn test
I think this is the part that is tripping things up; the hardcoded in Greenwood's app-template
Again, not sure if Greenwood should be doing this for the user, but I think that's been our general convention.
The text was updated successfully, but these errors were encountered: