Skip to content

Commit

Permalink
feat: add changelog page
Browse files Browse the repository at this point in the history
  • Loading branch information
abulte committed Apr 10, 2024
1 parent b14cde5 commit 4edd1ca
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/services/routerUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import BouquetAddView from '@/custom/ecospheres/views/bouquets/BouquetAddView.vu
import BouquetDetailView from '@/custom/ecospheres/views/bouquets/BouquetDetailView.vue'
import BouquetEditView from '@/custom/ecospheres/views/bouquets/BouquetEditView.vue'
import BouquetsListView from '@/custom/ecospheres/views/bouquets/BouquetsListView.vue'
import ChangelogView from '@/views/ChangelogView.vue'

import HomeView from '../views/HomeView.vue'
import LoginView from '../views/LoginView.vue'
Expand Down Expand Up @@ -136,6 +137,13 @@ export default class RouterFetch {
component: LogoutView
})
}

items.push({
path: '/changelog',
name: 'changelog',
component: ChangelogView
})

return items
}
}
4 changes: 4 additions & 0 deletions src/typings/markdow.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module '*.md?raw' {
const content: string
export default content
}
22 changes: 22 additions & 0 deletions src/views/ChangelogView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<script setup lang="ts">
import { computed } from 'vue'
import { fromMarkdown } from '@/utils'
import changelogContent from '../../CHANGELOG.md?raw'
const links = computed(() => [
{ to: '/', text: 'Accueil' },
{ text: 'Changelog' }
])
</script>

<template>
<div class="fr-container">
<DsfrBreadcrumb class="fr-mb-1v" :links="links" />
</div>
<div class="fr-container fr-mb-4w">
<!-- eslint-disable-next-line vue/no-v-html -->
<div v-html="fromMarkdown(changelogContent)"></div>
</div>
</template>
3 changes: 2 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export default defineConfig(({ mode }) => {
test: {
environment: 'happy-dom',
globals: true
}
},
assetsInclude: ['**/*.md']
}
})

0 comments on commit 4edd1ca

Please sign in to comment.