Skip to content

Commit

Permalink
Add wip Decap CMS
Browse files Browse the repository at this point in the history
  • Loading branch information
AnimatedSwine37 committed Apr 13, 2024
1 parent 476bc7c commit 81c8223
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
17 changes: 16 additions & 1 deletion _includes/head_custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,19 @@

<script src={%link assets/js/gameDropdown.js %}></script>
<script src={%link assets/js/navbarHide.js %}></script>
<link rel="stylesheet" href={%link /assets/css/dropdown.css %}>
<link rel="stylesheet" href={%link /assets/css/dropdown.css %}>

<!-- Redirect to admin page after logging in -->
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>

<script>
if (window.netlifyIdentity) {
window.netlifyIdentity.on("init", (user) => {
if (!user) {
window.netlifyIdentity.on("login", () => {
document.location.href = "/persona-modding-docs/admin/";
});
}
});
}
</script>
14 changes: 14 additions & 0 deletions admin/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
backend:
name: github
repo: AnimatedSwine37/persona-modding-docs
branch: master
base_url: http://ec2-13-54-217-203.ap-southeast-2.compute.amazonaws.com

media_folder: "assets/images/uploads"

collections:
- name: 'blog'
label: 'Blog'
folder: '_posts/'
fields:
- { name: Title }
16 changes: 16 additions & 0 deletions admin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<html>

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Content Manager</title>
<!-- Include the identity widget -->
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js" type="text/javascript"></script>
</head>

<body>
<!-- Include the script that builds the page and powers Decap CMS -->
<script src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js"></script>
</body>

</html>

0 comments on commit 81c8223

Please sign in to comment.