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 "README.md" files to "index.md" #1021

Closed
ghost opened this issue Nov 17, 2018 · 11 comments
Closed

Rename "README.md" files to "index.md" #1021

ghost opened this issue Nov 17, 2018 · 11 comments

Comments

@ghost
Copy link

ghost commented Nov 17, 2018

Feature request

README.md is too specific for generic root content files and can be misleading. #23 allows to use index.md.

What problem does this feature solve?

README is the established name for contextual documentation files. Using this name can be misleading for newcomers and index.md makes it easier to understand what the purpose of the file is.

I understand that everyone is free to use either README or index but note that many people will follow your example here, check out how it's done in your docs and at least for me it was not obvious while reading the documentation that README files are treated as index files or that the naming is meaningful at all.

https://github.com/vuejs/vuepress/blob/master/packages/%40vuepress/theme-default/components/Page.vue#L127 probably needs to be changed, too.

@ulivz
Copy link
Member

ulivz commented Nov 17, 2018

Both of them are supported, using index.md or README.md is up to you. See #23.

@ulivz ulivz closed this as completed Nov 17, 2018
@ghost
Copy link
Author

ghost commented Nov 17, 2018

In this case it should be explained in the docs. You probably missed the edit I submitted just when you closed this.

@ghost
Copy link
Author

ghost commented Nov 17, 2018

Also, please check if

https://github.com/vuejs/vuepress/blob/master/packages/%40vuepress/theme-default/components/Page.vue#L127 probably needs to be changed, too.

If I understand it correctly, index.md breaks the edit links.

@ulivz
Copy link
Member

ulivz commented Nov 17, 2018

Our original intention is that writing two solutions in the document at the same time may make the novice fear: which one should I choose?

If you feel that there is a suitable location in the document to declare this choice, welcome to contribute for that.

What you said later is really a problem, but it doesn't seem to be easily fixed. We have to pass the type info(index or README) from server side to client side, which is not very elegant.

@ulivz
Copy link
Member

ulivz commented Nov 17, 2018

To avoid problems, it is recommended that you use the README for now. We can record this problem first (You can open another issue for that), and then confirm that if there is a suitable solution and then switch back.

@ghost
Copy link
Author

ghost commented Nov 17, 2018

Our original intention is that writing two programs in the document at the same time may make the novice fear: which solution should I choose?

My suggestion here is to use index.md as the only standard for root content files. README is as described not a good name and can cause conflicts in github environments. Replace README with index, then add a paragraph in the docs that explains the purpose and usage of index.md files. I'm willing to contribute to the docs once I've learned more about it, for now I can only help with reporting issues.

To avoid problems, it is recommended that you use the README for now.

Alright, good to know.

@viktorsmari
Copy link

viktorsmari commented Dec 16, 2019

This is a top hit on Google, but how do you use README.md as a 'normal readme' and not as a website?
I wanted to use the README.md as a guide how to set up the project (as it's normally done on GitHub and Gitlab).

On Github and Gitlab (and more?), the README.md is rendered on every repositories page.

So, I want to disable what VuePress does out of the box (converting a README.md to an index.html)
and simply use a index.md instead.

Is this easily possible? (And why on earth is it not the default behaviour!?)

@veidenberg
Copy link

veidenberg commented Feb 11, 2020

This is a top hit on Google, but how do you use README.md as a 'normal readme' and not as a website?

Fortunatley the default filename selection is slightly different for VuePress and Github. To target markdown files for both, rename the GitHub readme as README.markdown and Vuepress file as index.md or readme.md.

@rickalex21
Copy link

Thanks to #23 I figured out that I don't want to make changes because this may conflict with future plugins? Coming from hugo using 'index.md' is a page and '_index.md' is a list page. In vuepress by the looks of it you have to render a component on Page.vue to make it list page. I'm sure there's a way to use frontmatter instead kind:list instead of using this in my markdown.

<Posts page="code" />

@fPkX6F1nGTX
Copy link

I just asked a question over here but if anyone on this thread can answer, please do so:
#23 (comment)

@fPkX6F1nGTX
Copy link

I just asked a question over here but if anyone on this thread can answer, please do so: #23 (comment)

Also please contribute to discussion here which implies index.md would NOT be allowed (as of late 2021):
https://stackoverflow.com/a/69190614/12763497

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

5 participants