瀏覽代碼

Here's one way that could show snippets, and execute them /cc @hedgerh @arturi

Kevin van Zonneveld 9 年之前
父節點
當前提交
6a2d59a921

+ 1 - 1
website/_config.yml

@@ -37,7 +37,7 @@ permalink: :year/:month/:day/:title/
 tag_dir: tags
 tag_dir: tags
 archive_dir: archives
 archive_dir: archives
 category_dir: categories
 category_dir: categories
-code_dir: downloads/code
+code_dir: examples
 
 
 # Directory
 # Directory
 source_dir: src
 source_dir: src

+ 31 - 0
website/src/examples/index.ejs

@@ -0,0 +1,31 @@
+---
+title: CDN
+type: examples
+order: 0
+---
+
+{% blockquote %}
+CDN
+{% endblockquote %}
+
+<p>
+This example showcases sourcing an UMD dist build straight from a CDN.
+</p>
+
+<p>
+We're executing the following HTML snippet:
+</p>
+
+{% include_code app.html lang:html playground/src/html/app.htmls %}
+<% include playground/src/html/app.htmls %>
+
+<p>
+We're sourcing the following JS snippet:
+</p>
+
+{% include_code app.js lang:js playground/src/js/app.js %}
+<script src="playground/static/js/app.js"></script>
+
+<p>
+: )
+</p>

+ 0 - 21
website/src/examples/index.md

@@ -1,21 +0,0 @@
----
-title: CDN
-type: examples
-order: 0
-snippets: [ playground/src/html/app.html, playground/src/js/app.html ]
----
-
-> CDN
-
-<script src="/js/uppy.js"></script>
-
-<script>
-var uppy = new Uppy.Core();
-uppy.use(Uppy.plugins.Tus10);
-
-console.log(Uppy);
-console.log('Uppy loaded from CDN with a tus 1.0 plugin');
-</script>
-
-
-This example showcases sourcing an UMD dist build straight from a CDN.

+ 9 - 0
website/src/examples/playground/src/html/app.htmls

@@ -0,0 +1,9 @@
+<script src="/js/uppy.js"></script>
+
+<script>
+var uppy = new Uppy.Core();
+uppy.use(Uppy.plugins.Tus10);
+
+console.log(Uppy);
+console.log('Uppy loaded from CDN with a tus 1.0 plugin');
+</script>