egoist / docute

📚 Effortless documentation, done right.
https://docute.egoist.dev
MIT License
3.8k stars 427 forks source link

README.md not being applied and Title has the word undefined #237

Closed oren closed 5 years ago

oren commented 5 years ago

Issuehunt badges

  1. Why I can't see the content of README.md?
  2. Why is the title on the browser's tab say 'Undefined - Oren's Website'

URL: https://oren.github.io/new/ code: https://github.com/oren/oren.github.io/blob/master/new/README.md

Thanks!


IssueHunt Summary ### Sponsors (Total: $40.00) - [issuehunt issuehunt](https://issuehunt.io/u/issuehunt) ($40.00) #### [Become a sponsor now!](https://issuehunt.io/r/egoist/docute/issues/237) #### [Or submit a pull request to get the deposits!](https://issuehunt.io/r/egoist/docute/issues/237) ### Tips - Checkout the [Issuehunt explorer](https://issuehunt.io/r/egoist/docute/) to discover more funded issues. - Need some help from other developers? [Add your repositories](https://issuehunt.io/r/new) on IssueHunt to raise funds.
egoist commented 5 years ago

Try sourcePath: '/' ?

egoist commented 5 years ago

Ah, I guess we can set sourcePath to / by default.

IssueHuntBot commented 5 years ago

@issuehunt has funded $40.00 to this issue.


janat08 commented 5 years ago
  1. You're supposed to host the readme.md alongside index.html. If you'd rather not you can specify the option sourcePath: 'https://github.com/oren/oren.github.io/tree/master/new'.
janat08 commented 5 years ago
  1. I assume that this is caused by service worker errors, otherwise a message should've appeared indicating that readme isn't reachable.
egoist commented 5 years ago

yep this could solve the issue:

sourcePath: location.hostname === 'localhost' ? '/' : 'https://oren.github.io/new/'

but I found another bug, if you open https://oren.github.io/new/ it will try to load https://oren.github.io/new/new/README.md while I think https://oren.github.io/README.md should be the correct default behavior.

Closing this and maybe open another issue for this bug instead.

oren commented 5 years ago

I added sourcePath: location.hostname === 'localhost' ? '/' : 'https://oren.github.io/new/' but it's not solving it - https://github.com/oren/oren.github.io/blob/master/new/index.html#L20

Also, how come that new/articles is working fine? https://oren.github.io/new/articles without any code change?

janat08 commented 5 years ago

You may try 'https://github.com/oren/oren.github.io/tree/master/new'. All of your files and markdown has to be in the same place as from which you're sending index.html with docute script. I'm guessing that the articles are on your server, while the markdown is only on github. You'll have to move the articles to github for the above option to work, or move markdown to server thats hosting the website and try egoist's solution again.

janat08 commented 5 years ago

I'm guessing this based your sidebar links and if you're moving stuff to the server than change those.

oren commented 5 years ago

I apologize but I am not following your advice. Let me make sure I clarify my situation: I have README.md in the folder /new and I also have README.md in /new/articles. From some reason I don't see it being rendered on /new but I do see it when I go to /new/articles

janat08 commented 5 years ago

Try sourcePath: location.hostname === 'localhost' ? '/' : 'https://oren.github.io/'. It's still trying to access /new/new/readme

janat08 commented 5 years ago

Im just guessing btw.

janat08 commented 5 years ago

Not sure if the above solution is a workaround, or is dependent on the related issue about basePath being fixed.