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

Fix bug where URI path is to a file and not to directory #427

Closed
dekelyi opened this issue Mar 18, 2018 · 1 comment · Fixed by #1372
Closed

Fix bug where URI path is to a file and not to directory #427

dekelyi opened this issue Mar 18, 2018 · 1 comment · Fixed by #1372
Labels

Comments

@dekelyi
Copy link

dekelyi commented Mar 18, 2018

When trying to access the website page via domain.example/index.html instead of domain.example, docsify is trying to read the markdown files relative to index.html as he thinks this is a directory, which result in HTTP 404 Error.

docsify.min.js:1 GET localhost/index.html/README.md 404 (Not Found)

Please fix and thank you for your awesome documentation generator.

@stale
Copy link

stale bot commented Feb 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 4, 2020
@stale stale bot closed this as completed Feb 11, 2020
rgladwell added a commit to rgladwell/docsify that referenced this issue Sep 12, 2020
Docsify must be hosted on a server that supports a default directory
index (i.e. maps `/.../` -> `/.../index.html`).

Some platforms do not support this, however. For example, HTML apps
hosted on the popular game/software platform, Itch.io.

This change supports hosting Docsify off an explicit path file, such as
`/index.html`. It does this by:

 1. Adding handling for paths like `index.html#/blah`, and
 2. Normalising paths with fragments back to markdown paths

For example, `http://example.org/index.html#/blah` would be mapped to
`http://example.org/blah.md`.

This fixes:

docsifyjs#427
@Koooooo-7 Koooooo-7 reopened this Sep 13, 2020
rgladwell added a commit to rgladwell/docsify that referenced this issue Oct 8, 2020
Docsify must be hosted on a server that supports a default directory
index (i.e. maps `/.../` -> `/.../index.html`).

Some platforms do not support this, however. For example, HTML apps
hosted on the popular game/software platform, Itch.io.

This change supports hosting Docsify off an explicit path file, such as
`/index.html`. It does this by:

 1. Adding handling for paths like `index.html#/blah`, and
 2. Normalising paths with fragments back to markdown paths

For example, `http://example.org/index.html#/blah` would be mapped to
`http://example.org/blah.md`.

This fixes:

docsifyjs#427
rgladwell added a commit to rgladwell/docsify that referenced this issue Oct 16, 2020
Docsify must be hosted on a server that supports a default directory
index (i.e. maps `/.../` -> `/.../index.html`).

Some platforms do not support this, however. For example, HTML apps
hosted on the popular game/software platform, Itch.io.

This change supports hosting Docsify off an explicit path file, such as
`/index.html`. It does this by:

 1. Adding handling for paths like `index.html#/blah`, and
 2. Normalising paths with fragments back to markdown paths

For example, `http://example.org/index.html#/blah` would be mapped to
`http://example.org/blah.md`.

This fixes:

docsifyjs#427
jhildenbiddle added a commit that referenced this issue Feb 7, 2021
* Fix: Cannot serve off `/.../index.html`

Docsify must be hosted on a server that supports a default directory
index (i.e. maps `/.../` -> `/.../index.html`).

Some platforms do not support this, however. For example, HTML apps
hosted on the popular game/software platform, Itch.io.

This change supports hosting Docsify off an explicit path file, such as
`/index.html`. It does this by:

 1. Adding handling for paths like `index.html#/blah`, and
 2. Normalising paths with fragments back to markdown paths

For example, `http://example.org/index.html#/blah` would be mapped to
`http://example.org/blah.md`.

This fixes:

#427

* Add end-to-end test for index file hosting

* Add code comments for explicit file changes

* Add additional tests for index file hosting

* Add additional tests for index file hosting

* [wip] Attempt to switch tests to Jest

* Add e2e test for new Jest test framework

* Verify sidebar links use file hosting

* Fix: endsWith() not supported for IE11

* Refactor: utility method moved to utility file

* Fix IE11 error from use of String.includes()

Co-authored-by: John Hildenbiddle <jhildenbiddle@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants