Open mforbes opened 1 year ago
For simple html you may have better luck with github pages. It's kind of complicated and daunting at first, but there's a lot of docs and it does work. Basically you put your page in a github repo, configure some things, and github serves it. CoCalc's share server is much better for doing things like rendering jupyter notebooks and other content that isn't just plain static html.
Regarding the symlink, that's not going to work at all, because cocalc copies the files out of your project to a completely different server, and serves them from there.
I think our docs used to be right but are not correct now. The problem is that you could put all kinds of nasty XSS attacks, etc., in a static html site, and people via https://cocalc.com/share/... are going to be subject to those attacks. So the html that gets served must be highly sanitized, or only allowed to be downloaded. I do host a couple of sites (e.g., https://wstein.org), but they have a different domain name, so the various attacks aren't a problem. Github similar does something with different domain names for any github pages. The only way to do what you want here is if we had subdomains, e.g., https://forbes.cocalc.com. Someday we may do that... or maybe we'll just outsource such hosting to cloudflare pages or github pages...
That should be pretty easy since Nikola provides a github pages deployment target (I have used it in the past). I just thought this might work (one stop shopping:-). While people are working on the pages, we can always run an in-project server which works fine for editing.
Thanks.
@williamstein Perhaps I closed this prematurely: do you want me to leave it open but change it to a request to update the docs?
Yep, the docs are now wrong.
I am trying to share a static website as per the instructions here, and I am running into a few issues.
I originally tried to share a folder via following a symlink. This breaks with an error:
Presumably the sharing link is being done through the symlink, but the server can't follow the symlink for some reason.
Internal Server Error
.The best I can do is to embed it , but this leads to multiple nesting when navigating.
(I am trying to use Nikola to generate a draft version of our site for students to edit, and wanted to host a backup here for a bit because our main server is down due to electrical work.)