diff --git a/_config.yml b/_config.yml index e7adb82c4..2f4c85c37 100644 --- a/_config.yml +++ b/_config.yml @@ -47,5 +47,6 @@ exclude: - vendor/gems/ - vendor/ruby/ - STYLE_GUIDE.md + - "**/README.md" include: ["CNAME"] diff --git a/_layouts/code-preview.html b/_layouts/code-preview.html new file mode 100644 index 000000000..75650ba43 --- /dev/null +++ b/_layouts/code-preview.html @@ -0,0 +1,83 @@ +{% comment %} +Displays another page inside an iframe with source code on the left and the page on the right + +For maintainers: Set the url to display using the iframe_content_url variable in the frontmatter. +{% endcomment %} + + + + + + {{ page.title | escape }} - Docs - Data Commons + + + + + + + + + + + + + +
+ {% include header.html %} +
+
+
+

Source Code

+
Loading source code...
+
+
+

Output

+ +
+
+
+ {% include footer.html %} +
+ + {% include scripts.html %} + + diff --git a/api/web_components/examples/README.md b/api/web_components/examples/README.md new file mode 100644 index 000000000..188e61be8 --- /dev/null +++ b/api/web_components/examples/README.md @@ -0,0 +1,31 @@ +# Web Components Examples + +This directory contains the pages that render the side-by-side source code and rendered output for the Data Commons web components examples. + +## How the examples are rendered + +The examples are rendered into the `code-preview` layout in `/_layouts/code-preview.html`. + +A `