Skip to content

Commit

Permalink
add forestry.io support
Browse files Browse the repository at this point in the history
  • Loading branch information
NeroBlackstone committed Jun 20, 2021
1 parent 41e79a2 commit a79c1fe
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .forestry/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
new_page_extension: md
auto_deploy: false
admin_path: "/admin"
webhook_url:
sections:
- type: document
path: src/_data/site.yml
label: Settings
- type: document
path: src/about.md
label: About
- type: directory
path: src/posts
label: Pages
create: documents
match: "**/*"
exclude: _data.yml
new_doc_ext: md
- type: directory
path: src/xml
label: MusicXML
create: documents
match: "*.xml"
new_doc_ext: xml
upload_dir: ''
public_path: image
front_matter_path: ''
use_front_matter_path:
file_template: ":filename:"
build:
preview_output_directory: _site
install_dependencies_command: deno --version
preview_docker_image: denoland/deno:latest
mount_path: "/srv"
working_dir: "/srv"
instant_preview_command: deno run -A https://deno.land/x/lume/ci.js --serve
55 changes: 55 additions & 0 deletions src/admin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!-- forestryio: ignore; forestryio: admin -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="robots" content="noindex" />
<title>Admin</title>
<meta name="description" content=" " />
<meta name="author" content=" " />
<meta name="HandheldFriendly" content="true" />
<meta name="MobileOptimized" content="320" />
<!-- 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" />

<!-- Google font -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">

<!-- Fort awesome icon kit -->
<script src="https://use.fortawesome.com/b6f38602.js"></script>

</head>
<body>
<div id="app">

</div>
<script id="admin-config-script" type="text/javascript">
var env = {
siteId: "lodcqpmhaz7hwa",
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>

</body>
</html>

0 comments on commit a79c1fe

Please sign in to comment.