dodgercms
dodgercms copied to clipboard
Provide a static way of navigating the site
It seems the menu system is totally dynamic which means that any bot wishing to index the site needs Javascript... Googlebot by default does not have Javascript enabled, Google has bots that can index Javascript but not all of its bots do so. So there needs to be a static way to allow the site to be indexed. Either we need a sitemap or we need to do something about the menu system and generate some static html for it... Thoughts?
Generating a sitemap would be a pretty simple addition. The menu could also be added to each static page when it's saved, then replaced with JavaScript when the page is loaded. Adding a sitemap may be enough, not too sure.
Is there any actual need for the dynamic menu? What are the benefits of having a dynamic menu on the published site?
Let's say you delete an entry. If you go to a different entry in your system on the front end, the menu would still show the one you deleted. If the menu were static, every page would need to be regenerated each time the uri structure of any entry were edited or deleted.
Ok. So you don't have to regenerate the entire site structure because of this. Interesting.
... and what about the breadcrumbs, is there a good reason to keep them dynamic as well?
It's the same reasoning. For example, let's say this is your URL
structure.
root
│ index
└───folder1 (Docs)
│ install
│ help
Docs is the label for folder1
. The breadcrumbs for the pages /folder1/install
and /folder1/help
would be Home >> Docs >> Install
and Home >> Docs >> Help
.
If I change the label for folder1
to Documentation, the breadcrumbs would be incorrectly shown, unless I recompiled each static page in that folder with the new information.
This is the reason it's dynamic - to prevent each page from having to be regenerated each time entries/folders are edited, added and removed.
Ok. So let's give users a choice of incorporating a static version of the breadcrumbs and menu that is then removed and replaced with a dynamic version. Which obviously will be outdated, but will allow the site to get indexed by bots that don't parse dynamic content. And I guess also add a sitemap.
A static version would be a good. I've been thinking of adding a button in the backend that goes through each entry and updates its html and pushes it up to s3.
That would probably be ideal. To have a way to regenerate all the pages that is not mandatory. The only concern would be the amount of time it takes to perform the operation. Any concerns with timeouts, etc.