From fb1fb77c19149736f25f46f2a5dd54e96eb92586 Mon Sep 17 00:00:00 2001 From: Robbie Cook Date: Mon, 18 Nov 2019 15:42:24 +1300 Subject: [PATCH 1/2] Adding section for conditionally embedding scripts --- .../_editing_docs/editors/visual-editor.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/collections/_editing_docs/editors/visual-editor.md b/src/collections/_editing_docs/editors/visual-editor.md index adc1014..7b4fc1e 100644 --- a/src/collections/_editing_docs/editors/visual-editor.md +++ b/src/collections/_editing_docs/editors/visual-editor.md @@ -45,4 +45,16 @@ if (window.location.host === "app.cloudcannon.com") { } else { alert("Not in CloudCannon."); } +{% endhighlight %} + +You can also conditionally import scripts embedded in your HTML: + +{% highlight html %} + {% endhighlight %} \ No newline at end of file From 1acac08bbdba403097242bfc3f09045f8ecf8dde Mon Sep 17 00:00:00 2001 From: Robbie Cook Date: Mon, 18 Nov 2019 16:12:02 +1300 Subject: [PATCH 2/2] Added more changes to visual editor docs and added README.md --- README.md | 16 ++++++++++++++++ .../_editing_docs/editors/visual-editor.md | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..6f406a4 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# 📚 CloudCannon Documentation + +![GitHub package.json version](https://img.shields.io/github/package-json/v/CloudCannon/documentation) ![GitHub pull requests](https://img.shields.io/github/issues-pr/Cloudcannon/documentation?label=Pull%20Requests) + +This repo holds the source code for Cloudcannon's docs at docs.cloudcannon.com. + +## Local Development +To install locally, clone the repo, then run these commands: + +```bash +cd src +npm install +gem install bundler +bundle install +gulp dev +``` diff --git a/src/collections/_editing_docs/editors/visual-editor.md b/src/collections/_editing_docs/editors/visual-editor.md index 7b4fc1e..c5958f2 100644 --- a/src/collections/_editing_docs/editors/visual-editor.md +++ b/src/collections/_editing_docs/editors/visual-editor.md @@ -47,7 +47,8 @@ if (window.location.host === "app.cloudcannon.com") { } {% endhighlight %} -You can also conditionally import scripts embedded in your HTML: +You can also conditionally import scripts embedded in your HTML based on whether or not you +have the visual editor open: {% highlight html %}