substrate-docs icon indicating copy to clipboard operation
substrate-docs copied to clipboard

Confusion in gatsby file content if files named the same.

Open nuke-web3 opened this issue 2 years ago • 2 comments

content/md/en/docs/main-docs/deploy/monitor.md content/md/en/docs/tutorials/get-started/monitor.md

The same filename, somehow it gets confused in linking/nav hosted URL is correct based on nav.yaml, but the contents are incorrect

nuke-web3 avatar Jun 14 '22 14:06 nuke-web3

I think we can just avoid doing this rather than try to fix it. @jonnysmillie, what do you think? Is this worth keeping open as a known issue or closing as a procedural note moving forward?

lisa-parity avatar Jun 22 '22 20:06 lisa-parity

I have no idea why this would happen, it shouldn't happen. It could even be a bug in Gatsby itself or one of the Gatsby Remark plugins. I myself haven't consistently had this issue which makes me suspect that it could be a caching issue locally - but would need to investigate further.

In order to prevent this kind of confusion for us and Gatsby what I would like to try and achieve is standardisation of the Title, Filename, and Slug of all of our pages. This will have benefits in many ways.

  1. It will be more obvious which fils corresponds to which content (for us).
  2. There will be SEO benefits - more obvious title and slug means searches will be more likely to turn up that page.
  3. It provides consistency and helps the user in navigating content.

So what this would entail in the case of content/md/en/docs/tutorials/get-started/monitor.md is a change from:

Title: Monitor Node Metrics
Filename: monitor.md
Slug: /monitor/

to

Title: Monitor Node Metrics
Filename: monitor-node-metrics.md
Slug: /monitor-node-metrics/

I think we should apply this to all content files if possible. While this doesn't solve the issue raised entirely it does make it less likely to occur and if applied to all files would decrease potential for confusion and mistakes and make our repository cleaner and more accessible.

jonnysmillie avatar Jun 23 '22 09:06 jonnysmillie