Skip to content

Plain-text macro expander with React-inspired widgets. Markdown with steroids. 💪

Notifications You must be signed in to change notification settings

denisidoro/remacro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

remacro

⚠️ This has been deprecated in favor of tools such as zola

Usage

With this tool it's possible to generate a superset of markdown, so that you don't repeat yourself.

It also works for any plain-text content, so it's able to expand source code as well.

Examples:

Input Macros Output
# Hello World

Lorem ipsum

<LoveBox>This is a custom widget</LoveBox>
const Box = ({ icon, children }) => `> :${icon}: ${children}`

const LoveBox = ({ children }) => <Box icon="heart">{children}</Box>
# Hello World

Lorem ipsum

> :heart: This is a custom widget
foo, err := bar()
<Err v=foo />
const Err = ({ v }) => `if err != nil { 
   return nil, err 
}
return `   v   ", nil"
foo, err := bar()
if err != nil { 
   return nil, err 
}
return foo, nil
The syntax for writing macros is the same for writing components in React.

Live editor

Click here for a web-based editor with live preview.

CLI

Installation

npm install -g remacro

Call

remacro --input "$(cat input.md)" --macros "$(cat macros.js)" > output.md

Integration with VSCode

TODO

Provided macros

About

Plain-text macro expander with React-inspired widgets. Markdown with steroids. 💪

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published