Closed t2hv33 closed 3 years ago
Hi!
There is already an option for it that wasn't documented (till now 😄).
You can add an ignore array to your config and add your "private" folder:
plugins: [
{
resolve: `gatsby-philipps-foam-theme`,
options: {
rootNote: "/readme",
contentPath: "/",
ignore: [
"**/private/**",
],
},
},
],
Links to private pages for now result in a 404. I may remove the HTML a
tag and make it outstanding that the link won't work in the future.
Hi @phartenfeller
It's working like a charm when I use "**/private/**/*"
, all notes inside displayed 404, can't search.
"**/private/**"
: Pages inside private
can search
"**/private/**/*"
instead use "**/private/**"
plugins: [
{
resolve: `gatsby-philipps-foam-theme`,
options: {
rootNote: "/readme",
contentPath: `${__dirname}/..`,
ignore: [
"**/_layouts/**",
"**/.git/**",
"**/.github/**",
"**/.vscode/**",
"**/private/**/*", #using this for ignore all notes inside sub folder
],
},
},
],
Regards,
Thanks for the info, I changed the readme!
I created #6 to track removing links to excluded pages.
Regards, Philipp
Hi @phartenfeller As a user, I don't want to publish private notes Foam inside a specific folder. My structure folders tree
I have a lot of folders same level with docs After run
yarn develop
gatsby also renders allprivate
notes on thepublic
folder. My expectation here is:private
folders do not render. How to do that? Is there a way to avoid building pages with certain paths in Gatsby? Thanks,