diff --git a/.starters/default/content/articles/2.configure.md b/.starters/default/content/articles/2.configure.md index 8caf5400b..e9c6b4785 100644 --- a/.starters/default/content/articles/2.configure.md +++ b/.starters/default/content/articles/2.configure.md @@ -87,6 +87,12 @@ defineAppConfig({ navigation: false, // possible value are : true | false position: 'center', // possible value are : 'none' | 'left' | 'center' | 'right' message: 'Follow me on' // string that will be displayed on the footer (leave empty or delete to disable) + } + // Disable back to top button: false + backToTop: { + text: 'Back to top', + icon: 'material-symbols:arrow-upward' + } } }) ``` diff --git a/.starters/default/content/articles/3.write-articles.md b/.starters/default/content/articles/3.write-articles.md index 1a4e3b89e..ebedf07e9 100644 --- a/.starters/default/content/articles/3.write-articles.md +++ b/.starters/default/content/articles/3.write-articles.md @@ -91,6 +91,22 @@ description: Another description You are now ready to edit your article and create new ones! +## Optional Arguments + +In the frontmatter block, you can pass additional options for displaying your article, such as displaying badges on the image: + +```md +--- +cover: path/to/cover +date: 2022-08-23 +badges: [{ + color: 'white', + bg: 'rgba(0, 0, 0, 0.3)', + content: 'Technology' +}] +--- +``` + ## Read more Alpine is a Nuxt theme using the Content module in `documentDriven` mode. diff --git a/.starters/default/package.json b/.starters/default/package.json index b8fc11eaa..2c2e8774c 100755 --- a/.starters/default/package.json +++ b/.starters/default/package.json @@ -10,7 +10,7 @@ "lint": "eslint ." }, "devDependencies": { - "nuxt": "^3.4.3", + "nuxt": "^3.5.0", "@nuxt-themes/alpine": "^1.5.4", "@nuxtjs/plausible": "^0.2.1", "@nuxt/devtools": "^0.4.6", diff --git a/app.config.ts b/app.config.ts index cc980f124..bed2084d8 100644 --- a/app.config.ts +++ b/app.config.ts @@ -36,6 +36,10 @@ export default defineAppConfig({ }, form: { successMessage: 'Message sent. Thank you!' + }, + backToTop: { + text: 'Back to top', + icon: 'material-symbols:arrow-upward' } } }) diff --git a/components/content/ArticlesListItem.vue b/components/content/ArticlesListItem.vue index 30cedec31..875ec29ca 100644 --- a/components/content/ArticlesListItem.vue +++ b/components/content/ArticlesListItem.vue @@ -6,6 +6,7 @@ type Article = { title: string date: string description: string + badges?: { bg: string, text: string, content: string }[] } const props = defineProps({ @@ -30,15 +31,40 @@ const id = computed(() => {