In my folder “content” i have a folder home with some markdom files to display them on the front-page.
So how can i do to forbidden the access to https://my_project/home ?
home folder include an
index.md file with
headless: true in the front matter:
It doesn’t work, i loose all my content displayed on the front-page and i still have access to http://my_project/home
- I tried with index.md and _index.md
This works fine when I tested it. The only way to debug further would be if you can provide your home page layout and an example of your
home/index.md front matter.
To prohibit access to a web resource requires configuring a web server; the development web server in Hugo does not provide that functionality.
Again, this is what headless bundles are for and they work as expected. If you’re still having issues you’ll need to follow the instructions in my previous comment.
if you want to see in more details, here is the repo github :
i didn’t push the modification that you asked me to do.
Thank you for your help
The way you are using headless bundles will need to follow the same logic in the link I provided. You are currently assigning sections to those pages and using that to get the data, but instead you should be providing the file path per the examples in Hugo documentation. While assigning
headless: true to the front matter of
_home/index.md works as expected for me and prevents it from creating a section, it also prevents it from getting your bundle because of how you are using the
thank you for the solution to my problem, it works perfectly !