datopian / flowershow

๐Ÿ’ Publish your obsidian digital garden or any markdown site easily and elegantly.
https://flowershow.app/
MIT License
824 stars 98 forks source link

Remark wiki link refactor #467

Closed olayway closed 1 year ago

olayway commented 1 year ago

Closes #464

Changes

Notes

I think there should be a way of using micromark extensions only - our html and syntax - but maybe I'm missing sth (still not quite getting all the different elements of the system and ecosystem...) and we actually need to use syntax extension for micromark combined with fromMarkdown and toMarkdown for mdast-util-from-markdown. I actually started by writing syntax and html and both of them used in micromark do their job, i.e. they correctly convert md to html (see tests in remark-wiki-link/tests/micromarkExtensionWikiLink.spec.ts - mirror tests of fromMarkdown). But I couldn't make it work without using fromMarkdown - which is almost identical to html - and toMarkdown. For reference see also remark-wiki-link/src/lib/remarkWikiLink.ts file.

changeset-bot[bot] commented 1 year ago

๐Ÿฆ‹ Changeset detected

Latest commit: 913f1bfd1eb94e6c2a5f25c9914a2fdd3cc60fd6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | ---------------------------- | ----- | | @flowershow/remark-wiki-link | Minor | | @flowershow/template | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

netlify[bot] commented 1 year ago

Deploy Preview for spectacular-dragon-c1015c ready!

Name Link
Latest commit 913f1bfd1eb94e6c2a5f25c9914a2fdd3cc60fd6
Latest deploy log https://app.netlify.com/sites/spectacular-dragon-c1015c/deploys/64244dd2f9576200088810e1
Deploy Preview https://deploy-preview-467--spectacular-dragon-c1015c.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

olayway commented 1 year ago

Generally looks good (have high confidence in your code, there's a lot here and not sure i get all of it so have not reviewed in detail).

My one big comment would be there is no change to the README.md - have we changed the API (it looks like we have looking at contentlayer.config.js)? If so, worth noting that.

Oh, yes! You're right! I'll add notes to readme!

rufuspollock commented 1 year ago

@olayway i think this is good to merge (or maybe you are waiting on README)

one small thing: when you merge could you copy and paste the excellent summary in PR into the body of the merge commit message?

olayway commented 1 year ago

@olayway i think this is good to merge (or maybe you are waiting on README)

Yes, I'm just finishing adding configuration options to README and I'm merging

one small thing: when you merge could you copy and paste the excellent summary in PR into the body of the merge commit message?

Will do! :)