Open dzhuang opened 9 years ago
I think even with the sandbox this would still be pretty cumbersome. In addition, most of the things that you can do with Jinja would break in the setting, so it would still only solve half the problem. My plan for this is instead to allow pointing a course within a locally-running relate instance at a directory rather than a git repository. That way, changes can be immediately previewed right after the files are edited. This does not enforce validation, so there's some room for errors, but I think overall this is the most promising solution. What do you think?
I think your idea is great, at least for me. In fact, my original intention to raise this issue is to make it easier, although it is actually not easy :-), for my colleagues who wish to use my relate instance to develop their courses. Your idea is great, but that requires users to set up local developing env on their machines, which is not so realistic for my colleagues.
Here is an alternative idea: we build an IDE -like interface with a file browser on the left and an editor on the right. (We have already got code mirror and jstree, so the parts are there.) This can be popped open in a separate browser window, and a user can then edit the site "live" in some sort of preview mode.
This would entirely remove the requirement for the user to have local development environment of any sort, and in addition it would allow relatively immediate feedback on edits.
There are a few things that are unclear to me about how to do this, but I feel like all this is resolvable:
Wow! What a great idea. I like the idea of commit upon save
using Dulwich. I have not explored deeply into Dulwich package, although I've implicit expected that utility. Your idea is much further and more considerate than mine. If that can be applied, I think it's quite possible that course developers can use pull and drag to edit their course content, which will also reduce validation work, and lower the barrier for Relate user.
I know it's a time-consuming job to realize that, but using git/dulwich to validate/test a flow is cumbersome. I hope this can be a Todo in your plan.