{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang-nursery/mdBook/issues/685","repository_url":"https://api.github.com/repos/rust-lang-nursery/mdBook","labels_url":"https://api.github.com/repos/rust-lang-nursery/mdBook/issues/685/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang-nursery/mdBook/issues/685/comments","events_url":"https://api.github.com/repos/rust-lang-nursery/mdBook/issues/685/events","html_url":"https://github.com/rust-lang-nursery/mdBook/pull/685","id":319089421,"number":685,"title":"Add index preprocessor","user":{"login":"weihanglo","id":14314532,"avatar_url":"https://avatars2.githubusercontent.com/u/14314532?v=4","gravatar_id":"","url":"https://api.github.com/users/weihanglo","html_url":"https://github.com/weihanglo","followers_url":"https://api.github.com/users/weihanglo/followers","following_url":"https://api.github.com/users/weihanglo/following{/other_user}","gists_url":"https://api.github.com/users/weihanglo/gists{/gist_id}","starred_url":"https://api.github.com/users/weihanglo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weihanglo/subscriptions","organizations_url":"https://api.github.com/users/weihanglo/orgs","repos_url":"https://api.github.com/users/weihanglo/repos","events_url":"https://api.github.com/users/weihanglo/events{/privacy}","received_events_url":"https://api.github.com/users/weihanglo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-01T01:27:03Z","updated_at":"2018-05-01T17:15:12Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/rust-lang-nursery/mdBook/pulls/685","html_url":"https://github.com/rust-lang-nursery/mdBook/pull/685","diff_url":"https://github.com/rust-lang-nursery/mdBook/pull/685.diff","patch_url":"https://github.com/rust-lang-nursery/mdBook/pull/685.patch"},"body":"## The PR is for\r\n\r\nAdd new preprocessor to convert **README.md** to **index.md**.\r\n\r\n## Intent\r\n\r\n**README.md** is a de facto index file in markdown-based documentation. Many version control service such as GitHub, Gitlab and Bitbucket render README.md as index files while browsering source code on their web client. Hence, we may respect to README.md and convert it into index.md which would then convert into index.html.\r\n\r\nI think this behavior is what people expect nowadays. It would be nice to include this feature."},"comment":{"url":"https://api.github.com/repos/rust-lang-nursery/mdBook/issues/comments/385728375","html_url":"https://github.com/rust-lang-nursery/mdBook/pull/685#issuecomment-385728375","issue_url":"https://api.github.com/repos/rust-lang-nursery/mdBook/issues/685","id":385728375,"user":{"login":"weihanglo","id":14314532,"avatar_url":"https://avatars2.githubusercontent.com/u/14314532?v=4","gravatar_id":"","url":"https://api.github.com/users/weihanglo","html_url":"https://github.com/weihanglo","followers_url":"https://api.github.com/users/weihanglo/followers","following_url":"https://api.github.com/users/weihanglo/following{/other_user}","gists_url":"https://api.github.com/users/weihanglo/gists{/gist_id}","starred_url":"https://api.github.com/users/weihanglo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weihanglo/subscriptions","organizations_url":"https://api.github.com/users/weihanglo/orgs","repos_url":"https://api.github.com/users/weihanglo/repos","events_url":"https://api.github.com/users/weihanglo/events{/privacy}","received_events_url":"https://api.github.com/users/weihanglo/received_events","type":"User","site_admin":false},"created_at":"2018-05-01T17:15:12Z","updated_at":"2018-05-01T17:15:12Z","author_association":"NONE","body":"I have some concerns with opt-in this feature by default:\r\n\r\n1. What if a markdown file named `index.md` co-exists with `README.md`?\r\n1. mdbook picks the first prefix chapter item to generate the root `index.html`. How to solve the conflicts with another `README.md`?\r\n\r\nShould we need to inspect this issue? Or just leave the decision for users. Let users opt-out the preprocessor or reorganize their book structure manually.\r\n\r\nWe can also check out [how gitbook did on this issue](https://github.com/GitbookIO/gitbook/issues/392). I tried and it seems that if both `README.md` and `index.md` exist, Gitbook will generate the last one listed in `SUMMARY.md` as the only `index.html`."}}
{"actor":{"display_login":"weihanglo"}}