Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/idyll-lang/idyll-embed
Embed Idyll directly in an HTML page
https://github.com/idyll-lang/idyll-embed
Last synced: 14 days ago
JSON representation
Embed Idyll directly in an HTML page
- Host: GitHub
- URL: https://github.com/idyll-lang/idyll-embed
- Owner: idyll-lang
- License: mit
- Created: 2018-08-24T18:47:51.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T02:26:42.000Z (almost 2 years ago)
- Last Synced: 2024-10-30T00:54:56.909Z (21 days ago)
- Language: JavaScript
- Size: 1.91 MB
- Stars: 13
- Watchers: 3
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# idyll-embed
Embed Idyll directly in an HTML page## Usage
```html
// Create a new div where Idyll will inject content.
var div = document.createElement('div');
document.body.appendChild(div);// Get your markup.
var idyllMarkup = '# Hello World';// All standard components are available by default.
// To add additional components, register them.
Idyll.registerComponent('ComponentName', Component);// Instantiate the Idyll runtime.
Idyll.render(idyllMarkup, div);
```
## How to modify this library for your own needs
1. Clone this repo
2. Run `npm install` to install the dependencies.
3. Edit `index.js` according to your own use-case. See the comments in `index.js` for more info.
4. Rebuild the dist file: `npm run build`
5. Include the newly created JavaScript file (`dist/idyll-embed.min.js`) in your HTML.