Skip to content

Commit 47bb7cc

Browse files
committed
Adding Include documentation
1 parent 4ea0c21 commit 47bb7cc

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

src/docs/core/include.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!DOCTYPE HTML><script Modulo src="/static/js/Modulo.js" -src="/static/"></script><cms-MarkdownPage><script type=md>---
2+
title: Include
3+
---
4+
5+
6+
# Include
7+
8+
9+
Use a _Include_ definition to add in _script_, _link_, _meta_, or _head_
10+
dependencies.
11+
12+
### Example 1: For script and link dependencies
13+
14+
The simplest way to use `Include` is as a global definition. It will "include"
15+
it's contents in the head of the document as soon as Modulo loads. Note that
16+
it will NEVER include the same thing twice (it uses hashes to identify
17+
resources). This mode is great for following tutorials for integrating JS
18+
projects.
19+
20+
For example, to include Quill JS, it's as easy as just pasting in the head
21+
content they give you:
22+
23+
```
24+
<Include>
25+
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/quill.snow.css" rel="stylesheet" />
26+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/quill.js">/script>
27+
</Include>
28+
```
29+
30+
31+
32+
### Example 2: Including meta content
33+
34+
_Include_ can be used for adding meta tags to your page as well:
35+
36+
```
37+
<Include>
38+
<meta name="description" content="A great Modulo website" />
39+
<meta name="viewport" content="width=device-width, initial-scale=1" />
40+
<meta name="charset" charset="utf8" />
41+
</Include>
42+
```
43+

0 commit comments

Comments
 (0)