BeaconCMS / BeaconCMS/beacon_live_admin
Editor: Extend markdown to support HEEx features
- Dominant language
- JavaScript
- Stars
- 73
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
Regular Markdown converter isn't capable of handling HEEx features. We want a subset of a regular Markdown that is capable of parsing and generating valid HEEx without losing features or breaking the compilation.
### Function components
Beacon provides function components to display assets and will provide components for building pages, for eg:
```elixir
```
Using such component should generate the expected HTML tags as it would in a HEEx template.
### Navigation
A regular markdown link should probably generate the same markup as `<.link navigate=...">` to include the `phx-*` attributes and allow it to transition pages efficiently, otherwise it triggers a redirect.
### Research
[MDX](https://mdxjs.com) is a great solution for the JS ecosystem and we it can serve as inspiration to build something similar in Elixir.
The library [md](https://hex.pm/packages/md) ~may be~ is [capable of embedding heex](https://elixirforum.com/t/implementing-custom-markdown-parser-with-the-md-library/55025) but it doesn't support the CommonMark spec.
So a new library [mdex](https://hex.pm/packages/mdex) was created to support what is needed for Beacon, but loading Phoenix Components is still a WIP.
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no repository files, tests, or entry points. Start by reviewing the mdex and md libraries and linked pull request #76, then compare the proposed component and navigation behavior with the existing editor; done means Markdown can preserve the described HEEx features and produce valid, compiling output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir, markdown
- Domain
- content, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100