Hello,
I am sorry I have to ask the question,but after several hours of tests, i am desperate,and do not know what to do but ask you for help :
- I have seen many people asking the same question than me :
- they all seemed to have solved their issue
- I tried what was explained as a solution in all those entries in Hugo 's discourse, and still have no resultβ¦
So here it is :
- I run hugo version :
$ hugo version
Hugo Static Site Generator v0.78.2-959724F0 linux/amd64 BuildDate: 2020-11-13T10:08:14Z
$ hugo env
Hugo Static Site Generator v0.78.2-959724F0 linux/amd64 BuildDate: 2020-11-13T10:08:14Z
GOOS="linux"
GOARCH="amd64"
GOVERSION="go1.15.1"
$ git version
git version 2.11.0
- I have a hugo project. I created files in the layouts/ folder and in the content/ folder :
~/hugofied-gravitee-docs$ tree layouts/
layouts/
0 directories, 0 files
~/hugofied-gravitee-docs$ tree themes/
themes/
βββ gravitee-docs
βββ layouts
βββ _default
β βββ baseof.html
β βββ list.html
β βββ single.html
βββ index.html
βββ testjb
β βββ baseof.html
β βββ list.html
β βββ single.html
βββ testjb2
βββ index.html
5 directories, 8 files
~/hugofied-gravitee-docs$ tree content
content
βββ _index.md
βββ test
β βββ _index.md
β βββ test1.md
β βββ test2.md
β βββ test4
β βββ _index.md
βββ test2
βββ test3
βββ default.md
4 directories, 6 files
~/hugofied-gravitee-docs$ cat content/test/test1.md
---
layout: "testjb"
type: "test"
---
Fichier `content/test/test1.md`
~/hugofied-gravitee-docs$ cat content/test2/test3/default.md
---
layout: "testjb2"
type: "test2"
layout: "testjb"
---
Fichier `content/test/testX.md`
~/hugofied-gravitee-docs$ cat content/test/test2.md
---
layout: "testjb2"
type: "test"
---
Fichier `content/test/test2.md`
~/hugofied-gravitee-docs$ cat config.toml
baseURL = "http://127.0.0.1:1313/"
languageCode = "en-us"
title = "Gravitee.io API Platform"
themesDir = "themes"
theme = "gravitee-docs"
- Result :
- http://127.0.0.1:1313/test/test1/ does exist (no 404),
- generated page for /test/test1/ is completely empty
- generated root page exists,and is absolutely not empty, it does base it self from the default layout
I am sure it will be extremely fast and easy to tell me what to do, to have those two pages use layout βtestjb2β
To see exactly all that I have in my project :
git clone https://github.com/gravitee-lab/hugofied-gravitee-docs
cd hugofied-gravitee-docs
git checkout HUGO_QUESTION_ONE
# and there you go, you have exactly the files I amtalking about
hugo serve --watch