-
Notifications
You must be signed in to change notification settings - Fork 23
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 config DOC_FOLDERS to support multiple doc folders #207
Conversation
gatsbyConfig.plugins.push({ | ||
resolve: 'gatsby-source-filesystem', | ||
options: { | ||
name: 'docs', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will source files in the folder into Gatsby system and create File
nodes. Later on, gatsby-transformer-remark
transforms markdown files into MarkdownRemark
nodes.
Here I'm trying to source data from DOC_FOLDER
or DOC_FOLDERS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these all have the same name: 'docs'
? Does this affect how we query them?
@@ -18,6 +18,8 @@ | |||
| `EXAMPLES` | `Array` | See below | | |||
| `INDEX_PAGE_URL` | `String` | Optional URL to a replacement component for the home page. | | |||
| `DOC_PAGE_URL` | `String` | Optional URL to a replacement component for doc pages. | | |||
| `DOC_FOLDER` | `String` | The path to the doc folder. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right now DOC_FOLDER doesn't do anything. ocular will always look into /docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should expose it explicitly to the users instead of looking into /docs magically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If DOC_FOLDER doesn't do anything let's delete it and use DOC_FOLDERS only? Having two of these does not seem to be in the user's interest.
from our conversation what this does is that this allows to build one single documentation tree from files existing in various folders. |
What use case do you have in mind? |
Right now, it still supports 'DOC_FOLDER' and 'DOC_FOLDERS' at the same time. The 'DOC_FOLDER' will supersede over 'DOC_FOLDERS' if both of them exist. |
@@ -18,6 +18,8 @@ | |||
| `EXAMPLES` | `Array` | See below | | |||
| `INDEX_PAGE_URL` | `String` | Optional URL to a replacement component for the home page. | | |||
| `DOC_PAGE_URL` | `String` | Optional URL to a replacement component for doc pages. | | |||
| `DOC_FOLDER` | `String` | The path to the doc folder. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If DOC_FOLDER doesn't do anything let's delete it and use DOC_FOLDERS only? Having two of these does not seem to be in the user's interest.
gatsbyConfig.plugins.push({ | ||
resolve: 'gatsby-source-filesystem', | ||
options: { | ||
name: 'docs', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these all have the same name: 'docs'
? Does this affect how we query them?
modules/gatsby/src/gatsby-node/process-nodes/process-nodes-markdown.js
Outdated
Show resolved
Hide resolved
…to warn the config to be deprecated soon.
|
the use case I have in mind is vis academy which i think is not the only "classic" ocular website with several documentation trees. this is in that spirit that i opened #173. the issue today is that "docs" is not only assumed to be the location of md files and documentation files, but also of the url of all of the documentation. when there are too many pages / too many levels it makes sense to no longer want to have all documentation be under one single tree, even if they can be visible under the search for instance. |
No description provided.