Not yet on Ghost Pro but want to be. Sorry this is long and fussy. Looking for tool / workflow that keeps me all within Ghost / GitHub (plus some kind of custom templating engine / processing tool or something?–this is the question).
I want to keep tech stack as simple as possible (super beginner with code, but tenacious), but still get the following automation:
My goal is to set up a pre-processing workflow–hopefully automated–in which I can use my own tiny custom strings (like ‘syntactic sugar’ in other languages like CoffeeScript?) to avoid most HTML in my original Markdown.
i.e. I want the original Markdown to stay very clean in terms of human readability–this is central to my goal/question. Instead of HTML, I want to add about 10 short custom syntax strings that lead to having custom element spans applied–i.e. some kind of text transformation, well beyond Ghost’s native Markdown parsing.
There might be 2-3 files involved to do this:
- My ‘custom’ markdown–this is the only file I want to stay very human-readable.
- The preprocessed, now HTML-rich markdown (that Ghost can convert perfectly). i.e. still Markdown, but now not very human-friendly due to expanded HTML.
(3. optional?) the fully-rendered HTML (maybe not needed, though, if Ghost or other static site generator builds this on-the-fly–not clear on how this part works, yet)
Here’s what I’m trying to figure out, specifically, workflow-wise. Can you help me fill in blanks?
- I blog in my ‘custom Markdown’ i.e. with my own additional custom strings in offline Markdown editor (iA Writer, for me).
e.g. Instead of writing in full-on element span tags (please, no), I just write NH3> 1 Consider that the artists...
where NH3>
is my custom string, but it’s just interpreted as body text, for now. (Also, the rest of the text up to the line break will, ideally, be transformed / spanned in a specific way, too, eventually.)
-
Somehow push(?) to GitHub(? Git? Still learning this part) which somehow connects to Ghost and/or something that can preprocess the custom Markdown.
-
This somthing (Template processor?) sees my custom markdown and pre-converts it to “Ghost Markdown”–i.e. Markdown that contains my custom HTML spans and is outputted it to the Ghost Markdown folder.
-
Ghost sees the new ‘Ghost Markdown’ file in the right folder and it becomes a new post (or draft).
(5.? Optional?) Not sure if this workflow works better with a static HTML page getting output, instead.
What’s your URL? re ‘Step 3’: Here’s the (rough) desired blog styling to go with above example: block 1 div, here (look for giant ‘1’ in a circle block): Blog page test — SingCamp
- What version of Ghost are you using? Want to use Ghost Pro
- What Node version, database, OS & browser are you using? Likely Chrome on Windows for me. Not sure about Node or Database–might be part of my question?
- What steps could someone else take to reproduce the issue you’re having? Uhh… Try to write a blog that uses 10 extra custom classes and still enjoy reading the Markdown (and have editors be willing to read the Markdown).
(I love Markdown–but I also love well-styled blogs…?)
If it helps, it seems that Zola Static Site Generator can do ‘custom markdown processing’ natively (maybe many do?) via user-customizable “Shortcodes” Shortcodes | Zola --something within the site generator (Tera macros via Rust?) just does this. But I think I want to be using Ghost.
Update / Big question: Can Handlebars preprocess my custom Markdown, or is it more just a postprocessor? Also, might postprocessing also be fine, for this use case?
I know I’ll have to build a custom template and that might be tricky, but if I can do this once and then use it for 100+ posts, it will be worth it to me.
Thanks for the time, patience, and any thoughts that may help!