Skip to content
Snippets Groups Projects
Commit a424dd8c authored by Eloi Perdereau's avatar Eloi Perdereau
Browse files

dégage netlify CMS et met forestry sur /lepuget

parent ac8cef98
No related branches found
No related tags found
No related merge requests found
...@@ -36,17 +36,6 @@ feature_row: ...@@ -36,17 +36,6 @@ feature_row:
btn_class: "btn--warning" btn_class: "btn--warning"
btn_label: "<i class='fas fa-music'></i> Infos" btn_label: "<i class='fas fa-music'></i> Infos"
--- ---
<script>
if (window.netlifyIdentity) {
window.netlifyIdentity.on("init", user => {
if (!user) {
window.netlifyIdentity.on("login", () => {
document.location.href = "/admin/";
});
}
});
}
</script>
{% include feature_row %} {% include feature_row %}
......
<!-- 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: "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>
</body>
</html>
# config.yml
backend:
name: git-gateway
repo: CCLuminy/CCL-site
branch: content # Branch to update (optional; defaults to master)
media_folder: 'assets/images/'
slug:
encoding: "ascii"
clean_accents: true
collections:
- name: 'data'
label: "Auteurs et Navigations"
editor:
preview: false
files:
- name: "authors"
label: "Auteurs"
file: "_data/authors.yml"
fields:
- label: "Auteurs"
name: "authors"
widget: "list"
fields:
- { label: "Nom à afficher", name: "name", widget: string }
- { required: false, label: "Nom court (pour l'url)", name: "prefix", widget: string }
- { label: "Avatar", name: "avatar", widget: image }
- { required: false, label: "Image de partage", name: "og_image", widget: string }
- { required: false, label: "Bannière par défaut", name: "banner", widget: string }
- { label: "Petite description", name: "bio", widget: string }
- { required: false, label: "Localisation", name: "location", widget: string }
- { required: false, label: "Email", name: "email", widget: string }
- { required: false, label: "Site internet", name: "uri", widget: string }
- { required: false, label: "Facebook", name: "facebook", widget: string }
- { required: false, label: "Helloasso", name: "helloasso", widget: string }
- required: false
label: "Autre"
name: "links"
widget: "list"
fields:
- {label: "Label", name: "label", widget: string}
- {label: "URL", name: "url", widget: string}
- {label: "Icone Fontawesome", name: "icon", widget: string, required: false}
- name: "navigation"
label: "Navigations"
file: "_data/navigation.yml"
fields:
- label: "Navigation d'entête"
name: "main"
widget: "list"
fields:
- {label: "Titre", name: "title", widget: string}
- {label: "Lien", name: "url", widget: string}
- label: "Navigations par 'auteur'"
name: "navs"
widget: "list"
fields:
- {label: "Nom court (pour url)", name: "name", widget: string}
- label: "Sections"
name: "nav"
widget: list
fields:
- {label: "Titre", name: "title", widget: string}
- {label: "Lien", name: "url", widget: string}
- label: "Sous-sections"
name: "children"
required: false
widget: "list"
fields:
- {label: "Titre", name: "title", widget: string}
- {label: "Lien", name: "url", widget: string}
- name: 'general'
label: 'Pages générales'
folder: '_pages/'
create: true
editor:
preview: true
fields:
- {label: "Titre de la page", name: "title", widget: "string"}
- {label: "Date de dernière mise à jour", name: "last_modified_at", widget: "date"}
- {label: "Remplacer le bandeau par défaut par un autre ?", name: "overlay_image", widget: "image", default: false}
- {label: "Body", name: "body", widget: "markdown"}
- name: 'ccl'
label: 'CCL'
folder: '_pages/ccl'
create: true
fields:
- {label: "Titre de la page", name: "title", widget: "string"}
- {label: "Date de dernière mise à jour", name: "last_modified_at", widget: "date"}
- {label: "Bandeau ?", name: "overlay_image", widget: "image", required: false}
- {label: "Body", name: "body", widget: "markdown"}
- name: 'l-asso'
label: "CCL/l'asso"
folder: '_pages/ccl/l-asso'
fields:
- {label: "Titre de la page", name: "title", widget: "string"}
- {label: "Date de dernière mise à jour", name: "last_modified_at", widget: "date"}
- {label: "Remplacer le bandeau par défaut par un autre ?", name: "overlay_image", widget: "image", required: false}
- {label: "Body", name: "body", widget: "markdown"}
- name: 'activites'
label: 'CCL/Activites'
folder: '_pages/ccl/activites/'
create: true
fields:
- {label: "Titre de la page", name: "title", widget: "string"}
- {label: "Date de dernière mise à jour", name: "last_modified_at", widget: "date"}
- {label: "Remplacer le bandeau par défaut par un autre ?", name: "overlay_image", widget: "image", required: false}
- {label: "Body", name: "body", widget: "markdown"}
- name: 'grenier'
label: 'CCL/Grenier'
folder: '_pages/ccl/grenier/'
create: true
fields:
- {label: "Titre de la page", name: "title", widget: "string"}
- {label: "Date de dernière mise à jour", name: "last_modified_at", widget: "date"}
- {label: "Remplacer le bandeau par défaut par un autre ?", name: "overlay_image", widget: "image", required: false}
- {label: "Body", name: "body", widget: "markdown"}
- name: 'jardin'
label: 'Jardin'
description: 'Tout est là'
folder: '_pages/jardin'
create: true
fields:
- {label: "Titre de la page", name: "title", widget: "string"}
- {label: "Date de dernière mise à jour", name: "last_modified_at", widget: "date"}
- {label: "Remplacer le bandeau par défaut par un autre ?", name: "overlay_image", widget: "image", required: false}
- {label: "Body", name: "body", widget: "markdown"}
<!-- admin/index.html --> <!-- forestryio: ignore; forestryio: admin -->
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>CCLuminy CMS</title> <meta name="robots" content="noindex" />
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script> <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> </head>
<body> <body>
<!-- Include the script that builds the page and powers Netlify CMS --> <div id="app">
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
</div>
<script id="admin-config-script" type="text/javascript">
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>
</body> </body>
</html> </html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment