I know this isn’t safedev question, but I am desperate to get this question answered and haven’t gotten one at the vue forum.
Having liked Grav so much,
a php-based CMS that uses markdown files including in translation,
I’m trying to do the same thing in vue by combining vue-18n with vue-markdown-loader.
This is my attempt to get it working:
Home.vue
<template>
<div v-html="$t('page')">
</div>
</template>
<script>
import Page from '@/components/BonjourLeMonde.md'
export default {
name: 'home',
components: {
Page
}
}
</script>
<i18n>
{
"en": {
"page": "<h1>Welcome to my homepage!</h1><br>Doesn't this look awesome?"
},
"fr": {
"page": "Non? <Page />"
}
}
</i18n>
BonjourLeMonde.md
# Bonjour tout le monde!
Bienvenue pour mon site de web.
It can load html tags, but it doesn’t load scripts I guess.
Does anyone know a solution to this?