puput icon indicating copy to clipboard operation
puput copied to clipboard

Is markdown supported ?

Open tian-yan opened this issue 3 years ago • 1 comments
trafficstars

I want to draft blog posts using Markdown, and wonder if wagtail-markdown is supported or not? Based on this URL, it seems that there is a branch support Markdown, but I do not know how to install that specific branch when deploying via docker-compose YAML file.

any advice please ?

tian-yan avatar Jan 20 '22 13:01 tian-yan

I ended up with customizing the source code myself to achieve below successfully via further installing wagtail-markdown package.

  • only use body as Markdown Field to draft articles.
  • automate excerpt generation via manually selected (manually append {: .excerpt}) contents. To be specific, all **bold text contents**{: .excerpt} elements in Markdown syntax will be rendered as <strong class="excerpt">bold text contents</strong>, and be searched out by beautifulsoup, concatenated, and saved to DB as a separate column.
  • automate header image generation via manually selected (manually append {: .excerpt}) image hyperlink. To be specific, ![image-name](image-URL){: .excerpt} in Markdown syntax will be rendered as <img class="excerpt">...</img>, then use beautifulsoup to search out this only <img> tag with class="excerpt" and save to DB as separate column. Lastly, I just need to fine-tune the template file to let the magic happens. It works well for me.

tian-yan avatar Jan 21 '22 16:01 tian-yan

Hello @tian-yan, in the new 1.2.1 version we included wagtail-markdown! Check it out: https://github.com/APSL/puput/releases/tag/1.2.1.

jlmirocoll avatar May 24 '23 14:05 jlmirocoll