Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Index #26

Open
lolmaus opened this issue Jun 21, 2020 · 2 comments
Open

Rename Index #26

lolmaus opened this issue Jun 21, 2020 · 2 comments

Comments

@lolmaus
Copy link

lolmaus commented Jun 21, 2020

The Index page and the index.md file seem to be hardcoded.

Renaming index.md crashes the app with:

FetchError: invalid json response body at http://localhost:4200/docs/index.json reason: Unexpected token < in JSON at position 0
    at /path/to/addon/node_modules/node-fetch/lib/index.js:272:32
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

"Index" means an alphabetical list, a table of contents.

But the Index page typically contains an introduction to the addon and has no alphabetical lists.

I would like to be able to rename it.

PS If you agree with this and think this is "a good starting issue", please provide some guidelines, and I'll be happy to attempt a PR.

@mansona
Copy link
Member

mansona commented Jun 22, 2020

hey @lolmaus 👋 thanks for opening these issues! it's really helping me push forward with field-guide 🎉

This particular issue is unlikely going to be fixed/changed though 🤔 index.md is intended to be similar to index.html as in "the default thing to serve when you access this folder"

This is a behaviour that is very well documented in a lot of hosting implementations and is even baked into node packages, so I'm pretty confident that this is an industry standard. I know we've had extensive conversations on the Discord about being able to configure and change things but adding the ability to change something so fundamental like this will likely introduce significant complexity for very little gain.

Does this all make sense?

@lolmaus
Copy link
Author

lolmaus commented Jun 23, 2020

I don't mind having the file named index.md.

But I don't like the navigation menu entry to be called Index for the end user. I want to rename it to something more user-friendly, such as Intro or About.

PS Note how the zero-config doctrine creates a conflict: you want the file name to indicate "the default thing to serve when you access this folder". I want the menu entry to be human-friendly. If field-guide were more flexible (e. g. this particular case could be solved with Markdown Frontmatter), then the issue wouldn't exist.

PPS This situation reminds me of desktop apps naming their menu entries as File, Edit, View. These names came from ancient file managers and were heavily related to manipulating files. Now every other app has a File entry, even when it's not dealing with files. Maybe it's time to move on?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants