-
I'm excited to discover doks. I have a good feeling about it! I'd like to pare down my site to just the docs page, and have it appear on the root. Can you describe how to do that? Likewise, I'd want |
Beta Was this translation helpful? Give feedback.
Replies: 19 comments 23 replies
-
In [permalinks]
blog = "/blog/:title/"
docs = "/:sections[1:]/:title/" In the frontmatter of ..
menu:
docs:
parent: "prologue"
weight: 100
toc: true
url: /
--- I'm not sure though how to update {{ with .Parent -}}
{{ partial "main/breadcrumb.html" . -}}
<li class="breadcrumb-item"><a href="{{ .RelPermalink }}">{{ if .IsHome }}Home{{ else }}{{ .Title }}{{ end }}</a></li>
{{ end -}} 👉 Help appreciated here! |
Beta Was this translation helpful? Give feedback.
-
Thank you! |
Beta Was this translation helpful? Give feedback.
-
The original home page still appears on https://www.hugonewbie.com, which is weird, because locally I was successful moving docs to the home page. I had removed /docs from the menu entirely. Would that impact (I don't yet understand this syntax.... A lot of learning curve.) Maybe netlify has a different priority hierarchy, and chooses layouts/index.com over the config url settings? In any case, implementing the solution above worked locally, but not on the live site. Sigh. suggestions welcome. Maybe I should try deleting that index page.... |
Beta Was this translation helpful? Give feedback.
-
I tried installing the starter theme. I'm having the same thing happen, where the docs will appear on the home page for a few minutes, and then it just defaults back to the original home page after that. Why would that happen? so weird. also, very frustrating. (By the way, I still see mounts on the starter theme. Does that mean that static and assets will still come from the source instead of locally? I very much want the docs to be the home page. But that home page remains persistent... like a zombie. It seems to be gone, but then it isn't. Can anyone else replicate this?
|
Beta Was this translation helpful? Give feedback.
-
For now all is working. Maybe removing index was the key. There are some slight changes here, from the answer provided above. In [permalinks]
blog = "/blog/:title/"
docs = "/:sections[1:]/:title/" This seems to be my solution, so far
In the frontmatter of ..
menu:
docs:
parent: "prologue"
weight: 100
toc: true
url: "/"
Remove layouts/index.html |
Beta Was this translation helpful? Give feedback.
-
I hope someone else is able to replicate my experience. Seems to take more than 5 minutes of clicking around before the zombie home page returns.
|
Beta Was this translation helpful? Give feedback.
-
We have an "open book" layout here:
https://github.com/epogrebnyak/finec-mgimo-v2, you can click on website
too. We had to change index.html and not much else, especially if you stay
in one-language setup.
@necelntano was helping a lot with setup, may be he has some details too
сб, 19 июн. 2021 г., 16:59 Henk Verlinde ***@***.***>:
… See also #187 <#187>
@epogrebnyak <https://github.com/epogrebnyak>, how did you manage to get
this similar setup?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#343 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACGWBLXGSEGX2VWLH37VIN3TTSPC5ANCNFSM4632HZOQ>
.
|
Beta Was this translation helpful? Give feedback.
-
https://github.com/mroswell/hugonewbie.com
From memory, typed on phone. At family gathering right now.
Sometimes it works and then 10 minutes later still the old site. Either a
caching issue or a retrieving from the parent theme issue, I guess.
On Sat, Jun 19, 2021 at 10:10 AM Evgeny Pogrebnyak ***@***.***> wrote:
@mroswell <https://github.com/mroswell> - do you have source of the
website somewhere in filesystem?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#343 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABPAOE6IBYEUM2DRNOTMITTTSQNBANCNFSM4632HZOQ>
.
|
Beta Was this translation helpful? Give feedback.
-
It occurs to me that I'm probably working with four different caches:
I discovered an option in WebStorm which is "Invalidate caches." What was happening was so weird this morning. Sometimes things worked locally but not on the live site. Sometimes visa versa. "Working," meaning the docs appeared on the home page. (I've decided against figuring out breadcrumbs for now, which was in the original question.) Fingers crossed, I haven't seen the unwanted homepage this evening. I figured out that this was more likely a caching issue (as opposed to some parent theme override, or somesuch), when I later simply turned off breadcrumbs, and they would appear or not appear, kind of randomly for a while, and then finally no longer appeared. I'll let you know if I have any more bizarre caching issues. I'm thinking that I can proceed with this project as a happy Doks user! Thanks so much for the support. I'll figure out how to mark an answer... and then maybe make one additional query about the section syntax. |
Beta Was this translation helpful? Give feedback.
-
I used kaleidoscope (mac directory comparison tool) to try to move everything from the starter theme over to the one that was using the child theme. (I did this because last time I tried to wholesale replace a project, I got caught up in git/github hell.) Of course, I retained the essential change from above. For some reason the zombie page was STILL there on local. I renamed the root _index.md to was_index.md. that seemed to (at least for now) remove the zombie home page. This has been one of the craziest web development experiences I've ever had. I'm hoping to get the docs format on the home page with no starter page. (I wouldn't invest this much time in making this work if I didn't have an otherwise REALLY good feeling about this theme and in Hugo in general.) I just keep suspecting that the mount has something to do with this... but I just don't know. |
Beta Was this translation helpful? Give feedback.
-
I deployed, and once again what appears locally is different than what appears on my local site. https://www.hugonewbie.com/ All the pages implement the theme but the home page. I don't know what's going on. |
Beta Was this translation helpful? Give feedback.
-
I'd like to find someone who is very skilled in hugo help me out. I'd be happy to pay for time over zoom on Tuesday. |
Beta Was this translation helpful? Give feedback.
-
I downloaded the starter theme from scratch. did the steps described above in Same issue: the zombie home page (making docs disappear), even on a project started from scratch, without using Webstorm... just these steps. Can anyone else replicate and identify a solution? |
Beta Was this translation helpful? Give feedback.
-
Your setup holds a conflict. On the one hand, Hugo tries to set the Introduction page as the homepage (as per setting So, try renaming |
Beta Was this translation helpful? Give feedback.
-
Pulling solutions together in one comment:
[permalinks]
blog = "/blog/:title/"
docs = "/:sections[1:]/:title/"
..
menu:
docs:
parent: "prologue"
weight: 100
toc: true
url: "/"
(Open to feedback if there are still tweaks that can be made to this.) |
Beta Was this translation helpful? Give feedback.
-
With starter theme you do not depend on node_modules - so may be easier to
manage.
пн, 21 июн. 2021 г. в 15:36, Marjorie Roswell ***@***.***>:
… Thanks. A note that this issue seems to be resolved. (I still don't
entirely understand the mounts, or the section syntax in h-enk's answer,
but I'm definitely clearer on template hierarchy... and I think (not sure)
that the cause of the zombie page was that it might've been pulling it from
node_modules. I'm happy to get past this big bump, and to continue climbing
the Hugo learning curve!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#343 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACGWBLVUMYJYGGUPDNPLMTLTT4W4FANCNFSM4632HZOQ>
.
|
Beta Was this translation helpful? Give feedback.
-
I got this to work a bit differently (at least, it looks like it works so far!). My files have paths like Two changes seem to get this to work for First:
Second:
I will try deploying and see what Netlify thinks of it. I tried instructions above and got a few broken pages. |
Beta Was this translation helpful? Give feedback.
-
For my own reference, for posterity, and for any internet wanderer that may happen across this thread, here's what I did to resolve the issue in a more straightforward way. 1. In layouts/_default/index.html, remove everything, including the "main" wrapper, and add the below.
This cycles through all the pages on the site (not just the top level, so may not be appropriate for enormous sites). If it finds a page with 2. In the front matter of the page you'd like to make your home page, add:
|
Beta Was this translation helpful? Give feedback.
-
There have been a lot of changes this the solutions were posted in this thread. It seems that none of them work in the latest version of Doks. @h-enk, do you have any pointers as to how folks can disable the homepage and point users straight to the |
Beta Was this translation helpful? Give feedback.
Pulling solutions together in one comment:
config/_default/config.toml
, set the docs permalink structure (see also Permalink Configuration Values):./content/docs/prologue/introduction.md
, add url:Delete or rename
layouts/index.html
Delete or rename
./layouts/_default/list.html
to./layouts/_default/list.bak.html
if this effort causes the "zombie" home page effect, in config.toml, comment out:
[[module.mounts]]
source = "nod…