Replies: 3 comments 2 replies
-
I was thinking of trying to modify our current Textile to:
|
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
-
I put a bunch of links in Pivotal, including to more-or-less official standards. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Switching to Markdown
@JoeCohen is researching switching from Redcloth gem to Redcarpet (which implies a switch from Textile to Markdown) and reports:
Textile and Markdown are two similar markup languages, but they're different. After looking Redcarpet over I don't believe it can convert Textile on the fly. Maybe it can be tricked into doing so, but that seems unwieldy.
If there's consensus it's advisable to switch from Textile to Markdown, I imagine we would need to do database conversions (migrations) of existing Textile into Markdown using something like the redmine reformat gem. I believe it's a chunk of work, but I'm in favor. However, as far as I can tell, these db conversions would NOT need to happen all at once, and should probably be done field by field (see outline below). Here's how i picture the steps involved:
String
extensions liket
andtpl
. These just call methods of theTextile
class to generate HTML. So we'd want to write a new class that does Markdown conversions to HTML, analogous to ourTextile
class. It should do everything ourTextile
class does, pretty much method for method.Textile
invokes Redcloth rendering methods, but it also does a lot of special handling of Names. Thankfully, I believe there is no difference between Textile and Markdown regarding the bold/italic markup used in MO's Names (is this true?), so names themselves would not need to undergo db conversions.Markdown
class, analogous to our extensions liketpl
that call Textile methods.Markdown
class methods to render the text from the database, instead of theTextile
class we use now.Here's the current erb, with notes on what it's doing
tpl
callsTextile.textilize
, the core of which is:An analogous string method that calls
Redcarpet::Markdown
class might be something like this (from the Redcarpet docs):Making info pages editable
Currently our Info pages are assembled from long translation strings that use Textile.
It could be nice to have a standard UI for editing page content for any page in the Info controller and storing that content in the DB by storing reference to the translation string for the page ID, more like a CMS.
Beta Was this translation helpful? Give feedback.
All reactions