Skip to content

Commit

Permalink
wip - cms
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitdemaegdt committed Nov 8, 2023
1 parent b0d4194 commit 710e3fc
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@

<script setup>
const { data: voies } = await useAsyncData(() => {
return queryContent('voies-lyonnaises').where({ _type: 'json' }).find()
})
return queryContent('voies-lyonnaises').where({ _type: 'json' }).find();
});
useHead({
script: [
{ src: 'https://identity.netlify.com/v1/netlify-identity-widget.js' }
]
});
</script>
19 changes: 19 additions & 0 deletions public/admin/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
backend:
name: git-gateway
branch: main

media_folder: static/img
public_folder: /img

collections:
- name: 'news'
label: 'Historique'
folder: 'content/news'
format: 'frontmatter'
create: true
slug: '{{year}}-{{month}}-{{day}}-{{slug}}'
editor:
preview: false
fields:
- { label: 'Date', name: 'date', widget: 'datetime' }
- { label: 'Texte bannière', name: 'newsBannerText' }
14 changes: 14 additions & 0 deletions public/admin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Content Manager</title>
<!-- Include the script that enables Netlify Identity on this page. -->
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></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 710e3fc

Please sign in to comment.