This may sound a bit strange but is it possible to display a block of html code on a RW page without it being rendered? I thought it would be easy - just use Format > HTML > Code but this doesn’t work. Here’s the code:
You can use a markdown stack.
On a line by itself place three backquote marks in a row(Usually above the tab key next to the number 1 on most keyboards). ```
Then paste the code followed by a line by itself with the three backquotes(back tics).
Using Markdown and the triple quote code block automatically replaces some characters (mostly the < character) with a special bit of HTML that looks like a < character. This prevents the browser from interpreting your code block as HTML. It also styles it with your themes codeblock styles.
This isn’t really a feature of Stacks, just the way Markdown works everywhere — even here on this forum you can use the same triple quote to display code.
Markdown is always the preferred way to use Stacks. It produces clean symantec HTML and works with your theme instead of overriding it.
Thanks very much for your response. Two points from this. Is there a way to replace the messed up < with a standard < in Markdown ? Although we haven’t seen problem so far. And, were you saying Markdown is the preferred stack over, say Text stack?
Not sure if I understand what you’re asking.
In markdown you can use single back quote’s around any text and it will be converted to an inline code chunck.
MarkDown also allows you to imbed actual HTML into markdown. So the “<“ symbol can be converted directly be using < .
Markdown is really easy to learn and use. It only takes about a half an hour or so to pickup the basics.
Markdown (and any time you see code on the web) swaps the < character with the HTML equivalent < – but it can do more than that too.
And, were you saying Markdown is the preferred stack over, say Text stack?
Yes. Absolutely. In fact at the recent weaver conference I gave a whole talk about that. How to get the most of text in Stacks.
Text in RapidWeaver (these are not just Stacks features – Stacks leans on the underlying text systems inside of RapidWeaver) comes in 3 varieties:
Styled Text
HTML (or Plain Text)
Markdown
Styled Text (the Text stack) is great while you’re getting started, but it overrides your theme to produce some styles, has a lot of quirks, and generally makes the priority ease-of-use and familiarity with word-processing rather than correctness and consistency.
Markdown will never produce output that’s inconsistent and will always use correct-by-design HTML.
I know it’s a bit of a pain to learn a new way of doing things, but I promise that for anyone that takes the 30 minutes to familiarize themselves with it, the time spent will be paid back many times over with beautiful consistent sites.
If you’re spending a lot of time with RapidWeaver you owe it to yourself.
Isaiah
P.S. – a little bird told me that Stacks 4 might come with a nice dedicated Markdown toolbar so that you can add Markdown styles with a simple click – look for it in the next couple months.