rstacruz / flatdoc

Build sites fast from Markdown
http://ricostacruz.com/flatdoc
2.68k stars 262 forks source link

Files don't fetch #25

Open cranca opened 10 years ago

cranca commented 10 years ago

Hi, I'm having an issue when fetching files. The GH repos work well but not files... I tried to put absolute paths and relative ones but any worked nor in Firefox neither in Chrome. I'm on a Win8 machine.

What I did:

If I change the init to point a GitHub repo, then it works

The same if I put it in a local web server the same occurs. Can anyone help me to find what I'm missing?

embedded-creations commented 10 years ago

Javascript is restricted from accessing the local filesystem. This discussion pointed me in the right direction: http://stackoverflow.com/questions/6923707/using-ajax-to-read-local-files

I ended up serving the local folder through a web server and then Flatdoc is able to read the local markdown file. Easiest way for me on a mac: http://lifehacker.com/start-a-simple-web-server-from-any-directory-on-your-ma-496425450

The same if I put it in a local web server the same occurs. Can anyone help me to find what I'm missing?

Hmm, maybe your issue isn't the same as mine, but maybe this will help someone else with a similar issue.

biohazard999 commented 10 years ago

I've run into the same problem, solved it via [https://code.google.com/p/mongoose/](https://code.google.com/p/mongoose/ Mongoose). Drop into your folder, start (maybe ajust the port) be happy :)