solidjs / solid-docs-next

SolidJS Docs.
https://docs.solidjs.com/
208 stars 230 forks source link

updated Renaming Index section to use file name in parens instead of … #738

Closed klequis closed 1 month ago

klequis commented 2 months ago

According to the latest docs for SolidStart > Routing Renaming Index, to rename the index file for a route you give the route the same name as the folder. This does not work:

According to the older doc, which I can no longer find, to rename the index file for a route you enclose file name in parens. This works:

Here is an example that illustrates these points: renaming-index-issue722-example

In the example I changed the /blog route to use the file I changed the /blog route to use the file name in parens:

If you run the example:

This pull request updates the docs to use the "file name in parens" method for renaming the index file.

Note on code highlighting

I wasn't completely sure what highlighting lines under /blog and /work was intended to show. I changed the highlighting to only highlight the (socials).tsx file as this what the text in the section is talking about, but perhaps missed the original intent.

stackblitz[bot] commented 2 months ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

netlify[bot] commented 2 months ago

Deploy Preview for solid-docs ready!

Name Link
Latest commit 90093c9988092e647cf8f459322855e0dbdaa347
Latest deploy log https://app.netlify.com/sites/solid-docs/deploys/667313d6a13aad0008dd72e3
Deploy Preview https://deploy-preview-738--solid-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

klequis commented 2 months ago

Addresses issue #722