arturadib / strapdown

Instant and elegant Markdown documents in the browser
http://strapdownjs.com
MIT License
2.48k stars 410 forks source link

Dynamic Content #34

Open jamiejackson opened 10 years ago

jamiejackson commented 10 years ago

I frequently find myself wanting to be able to modify the DOM content of a strapdown document on the fly. For instance, when creating a SIP, I don't want to create a nearly identical document for each environment. I'd rather create a master document, with placeholders, and have a way to select the environment (say with a select box) which triggers replacing a placeholder with its appropriate value.

Has anyone figured out a decent way to do this?

shawncplus commented 10 years ago

I created this https://github.com/shawncplus/markdown-talk which patches strapdown to allow you to specify the source as a github link shawncplus/bash-classes:historymanipulation.mkd, for example, which it will pull at pageload. It'd be trivial to check for a query parameter instead of looking at the source attribute.

jamiejackson commented 10 years ago

Thanks, @shawncplus, but I guess it's more that I want conditional output rather than conditional source selection.

For instance: At a certain point in the document, show version B of the paragraph instead of version A if, say "?version=B" is added as a URL variable.

javierarilos commented 8 years ago

@shawncplus IMHO being able to load markdown from another location is a very nice feature for strapdown.js ... guys, could be it possible to merge this into strapdown?

dralletje commented 8 years ago

Ain't strapdown incredibly sexy because of it's feature-less-ness?

javierarilos commented 8 years ago

It is always a complex discussion wether to add, or not, features to any technology... I think it is a very useful and simple addition to strapdown... but is just my opinion :smile_cat:

jamiejackson commented 8 years ago

I might try out the Bootmark fork (which includes external sources) and requesting features there, since this repo isn't getting any love lately.

obedm503 commented 8 years ago

i'll leave this here it's pretty useful bootmark