From 737e2b1ae0c124bef9594416d2361ad44d461ddb Mon Sep 17 00:00:00 2001 From: Cult Ure <webmasters@luminy.org> Date: Tue, 3 Nov 2020 23:24:29 +0000 Subject: [PATCH] Update from Forestry.io - Updated Forestry configuration --- .forestry/settings.yml | 2 +- admin/index.html | 31 ++++++++++++++++++++++++------- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.forestry/settings.yml b/.forestry/settings.yml index 9269605..b1816d9 100644 --- a/.forestry/settings.yml +++ b/.forestry/settings.yml @@ -9,7 +9,7 @@ sections: label: Pages create: all match: "**/*" - new_doc_ext: ".md" + new_doc_ext: md templates: - single - type: heading diff --git a/admin/index.html b/admin/index.html index 2752978..ac15b47 100644 --- a/admin/index.html +++ b/admin/index.html @@ -13,8 +13,6 @@ <!-- Use maximum-scale and user-scalable at your own risk. It disables pinch/zoom. Think about usability/accessibility before including.--> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> - <link rel="stylesheet" href="https://local.forestry.io/main.css" /> - <!-- Google font --> <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"> @@ -27,12 +25,31 @@ </div> <script id="admin-config-script" type="text/javascript"> - var env = { - siteId: "ngsw7f5rep036a", - local: false - }; + var env = { + siteId: "ngsw7f5rep036a", + local: false + }; + + function uuidv4() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); + } + + var uuid = uuidv4() + var script = document.createElement('script'); + script.src = "https://app.forestry.io/admin/forestry.min.js?hash=" + uuid + script.id = "forestry-admin"; + document.body.appendChild(script); + + var link = document.createElement("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = "https://app.forestry.io/admin/main.css?hash=" + uuid + document.head.appendChild(link); + </script> -<script type="application/javascript" src="https://local.forestry.io/forestry.min.js"></script> </body> </html> -- GitLab