feat(markdown): 2023q4 newsletter
This commit is contained in:
parent
30ea70b29b
commit
1edbf7d395
4 changed files with 1494 additions and 733 deletions
|
@ -2,10 +2,11 @@ import fs from 'fs'
|
|||
import path from 'path'
|
||||
import axios from 'axios'
|
||||
import { unified } from 'unified'
|
||||
import markdown from 'remark-parse'
|
||||
import remark2rehype from 'remark-rehype'
|
||||
import format from 'rehype-format'
|
||||
import html from 'rehype-stringify'
|
||||
import remarkParse from 'remark-parse'
|
||||
import remarkRehype from 'remark-rehype'
|
||||
import rehypeFormat from 'rehype-format'
|
||||
import rehypeStringify from 'rehype-stringify'
|
||||
import remarkGfm from 'remark-gfm'
|
||||
import mustache from 'mustache'
|
||||
import { testers } from '../config/newsletter-testers.mjs'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
@ -18,10 +19,11 @@ const backend = 'https://backend.freesewing.org/'
|
|||
|
||||
const asHtml = async (text) => {
|
||||
const content = await unified()
|
||||
.use(markdown)
|
||||
.use(remark2rehype)
|
||||
.use(format)
|
||||
.use(html)
|
||||
.use(remarkParse)
|
||||
.use(remarkGfm)
|
||||
.use(remarkRehype)
|
||||
.use(rehypeFormat)
|
||||
.use(rehypeStringify)
|
||||
.process(text)
|
||||
|
||||
return content.value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue