Replaces JSON data with YAML

This commit is contained in:
Alicia Sykes
2021-03-30 21:19:59 +01:00
parent 3320929beb
commit 479221c5d5
4 changed files with 342 additions and 395 deletions

View File

@@ -5,9 +5,9 @@
</div>
<div v-else class="there-are-items">
<Item
v-for="item in items"
:key="`${groupId}-${item.id}`"
:id="`${groupId}-${item.id}`"
v-for="(item, index) in items"
:id="`${index}_${makeId(item.title)}`"
:key="`${index}_${makeId(item.title)}`"
:url="item.url"
:title="item.title"
:description="item.description"
@@ -36,6 +36,11 @@ export default {
Collapsable,
Item,
},
methods: {
makeId(str) {
return str.replace(/\s+/g, '-').replace(/[^a-zA-Z ]/g, '').toLowerCase();
},
},
};
</script>