-
Notifications
You must be signed in to change notification settings - Fork 26
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
Include file from disk or git URL #53
Comments
"Stefan Hornburg (Racke)" notifications@github.com writes:
Here we have to do a distinction between the main display in the However, we could have an HTML display only option, which check for Would this sound acceptable? Marco |
I think @perlpunk was asking something like this with regard to external images. It's basically a similar problem which could be solved in a unified way. |
@melmothx right. in my use case the wiki is not seen as completely self-contained; it's a work-in-progress thing for sharing information, and outdated external resources are acceptable. |
Is a syntax like this |
More over these lines:
So you can have both the HTML and the formats with fresh content. |
Ok, I think the approach to the problem here is wrong. For a rationale of amusewiki, please see https://amusewiki.org/library/rationale This idea of external resources embedded at markup level is bad, because it just goes against the whole architecture. However, the problem is fixable in another way, which looks saner and more secure. Because of course, here this thing would open up a whole set of vulnerabilities (think about an http://localhost/path/which/is/supposed/to/be/served/only/to/localhost and here we go, it goes embedded in a public wiki). So, basically, you could have a script which does the following:
Such script could be very well provided as example and made it generic enough for other people to use, it would require a predictable amount of time to write and test, doesn't touch the application and the underlying modules, and just feels more in line with the way amusewiki works. Regarding the external images: either they are fetched and included in the archive at import time, and embedded into the formats, or they stay as link, as they are. Then the javascript approach could turn links to images into actual img tags to be displayed. I believe it's a matter of a dozen or two of javascript lines. This is done per site, and the javascript can be provided by the local.js file https://github.com/melmothx/amusewiki/blob/master/README#L111 |
Is the explanation (and solution) above enough and can I close this issue? |
Parser and compile code looks ready. |
This would be incredible useful for technical documentation instead of copy&paste the file everytime it changes. Examples would be programming code, configuration files etc.
The text was updated successfully, but these errors were encountered: