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

Allow pages and layout directory pages to be configurable #2514

Closed
Undistraction opened this issue Oct 18, 2017 · 0 comments · Fixed by #4490
Closed

Allow pages and layout directory pages to be configurable #2514

Undistraction opened this issue Oct 18, 2017 · 0 comments · Fixed by #4490

Comments

@Undistraction
Copy link
Contributor

Undistraction commented Oct 18, 2017

At present there is no way to change the location of the pages and layout directories in a project. This makes organising a project's src dir harder, because all JavaScript files can't be separated into their own directory and you end up with:

- pages
- layout
- styles
- javascript
- images
- fonts
- content
- etc…

By making the paths to these directories configurable they could be relocated to the javascript directory, making the src directory cleaner.

- styles
- javascript
- images
- fonts
- content
- etc…

Please note I am absolutely in favour of convention over configuration, but I feel that in this instance forcing directories of React components into the top level of the src directory isn't a good convention. A cleaner structure makes the site easier to use, especially by people with less experience in development (for example when handing off to a client who will be publishing their own content via the site).

See @KyleAMathews response to my Stack Overflow Question:

No it doesn't. Also fwiw, only pages and layouts are special directories. You can move templates and components to a js directory.

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