instant-markdown / instant-markdown-d

Small instant Markdown preview server
https://instant-markdown.github.io
Other
189 stars 103 forks source link

feat: ignore the YAML meta block when rendering #95

Closed hitzhangjie closed 2 years ago

hitzhangjie commented 2 years ago

This CL trims the YAML meta block string prefix.

This CL uses another markdown-it-front-matter to determine how to render the front matter part, which just ignores it so far.

And I add {enabled: true} to markdown-it-tasklists to render checkboxes.

Closes #94

hitzhangjie commented 2 years ago

Here is an example:

---                                                                                
layout: post
title: helloworld
---

# Heading1

**tcp client: write to a half-closed tcp connection!**

- [x] xxxxxxxxxxxxx
- [x] yyyyyyyyyyyyy
- [ ] xxxxxxxxxx

It will be rendered like this:

image
hitzhangjie commented 2 years ago

There's error in the check Node.js/build (windows-latest, 14):

 Windows long-path support already enabled.
  C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command ".\micromamba.exe shell init -s bash -p ~\micromamba -y"
  Modifiying RC file "C:\\Users\\runneradmin\\.bash_profile"
  Generating config for root prefix "C:\\Users\\runneradmin\\micromamba"
  Setting mamba executable to: "D:\\a\\instant-markdown-d\\instant-markdown-d\\micromamba.exe"
  ERROR: Could not find bash, or use cygpath to convert Windows path to Unix.
  Error: The process 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' failed with exit code 1
ashwinvis commented 2 years ago

Looks good! Thanks for the contribution!