Skip to content

Commit

Permalink
chore: add sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
Lionad-Morotar committed Mar 31, 2024
1 parent e5a5d5d commit 264b1ee
Show file tree
Hide file tree
Showing 4 changed files with 350 additions and 678 deletions.
118 changes: 82 additions & 36 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,65 +1,111 @@
import rssPosts from "./rss.js";

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
vue: {
compilerOptions: {
isCustomElement: tag => [].includes(tag)
isCustomElement: (tag) => [].includes(tag),
},
},
extends: ['@nuxt/ui-pro'],
extends: ["@nuxt/ui-pro"],
modules: [
'@nuxt/content',
'@nuxt/ui',
'@nuxthq/studio',
'@nuxtjs/fontaine',
"@nuxt/content",
"@nuxt/ui",
"@nuxthq/studio",
"@nuxtjs/fontaine",
"@nuxtjs/sitemap",
// ! wierd error, disable for a while
// "@nuxtjs/feed",
// ! cant fetch twimoji error, so disable for a while
// 'nuxt-og-image'
],
site: {
url: 'https://www.lionad.art',
},
// @ts-ignore see https://github.com/nuxt-community/feed-module
feed: {
path: "/rss.xml",
async create(feed) {
feed.options = {
title: "Lionad's blog",
link: "https://www.lionad.art/rss.xml",
description: "Feed for Lionad's Blog",
};
rssPosts.forEach((post) => {
feed.addItem({
title: post.title,
id: post.url,
link: post.url,
description: post.description,
content: post.content,
});
});
feed.addCategory("Lionad");
feed.addContributor({
name: "Lionad",
email: "[email protected]",
link: "https://www.lionad.art",
});
},
},
hooks: {
// Define `@nuxt/ui` components as global to use them in `.md` (feel free to add those you need)
'components:extend': (components) => {
const globals = components.filter((c) => ['Commend', 'Compare', 'ReadBase64', 'LLink', 'Spark', 'UButton', 'UIcon', 'AspectRatio'].includes(c.pascalName))
"components:extend": (components) => {
const globals = components.filter((c) =>
[
"Commend",
"Compare",
"ReadBase64",
"LLink",
"Spark",
"UButton",
"UIcon",
"AspectRatio",
].includes(c.pascalName)
);

globals.forEach((c) => c.global = true)
}
globals.forEach((c) => (c.global = true));
},
},
ui: {
icons: ['heroicons', 'simple-icons']
icons: ["heroicons", "simple-icons"],
},
content: {
highlight: {
theme: {
default: 'github-light',
dark: 'github-dark',
sepia: 'monokai'
}
}
default: "github-light",
dark: "github-dark",
sepia: "monokai",
},
},
},
routeRules: {
'/api/search.json': { prerender: true },
"/api/search.json": { prerender: true },
},
devtools: {
enabled: false,
},
typescript: {
strict: false
strict: false,
},
mdc: {
highlight: {
langs: [
'bash',
'cpp',
'css',
'glsl',
'html',
'less',
'js',
'powershell',
'scss',
'shell',
'ts',
'vue',
'makefile',
'csharp'
]
}
}
})
"bash",
"cpp",
"css",
"glsl",
"html",
"less",
"js",
"powershell",
"scss",
"shell",
"ts",
"vue",
"makefile",
"csharp",
],
},
},
});
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
"@iconify-json/simple-icons": "^1.1.97",
"@nuxt/content": "^2.12.1",
"@nuxt/ui-pro": "^1.1.0",
"@nuxtjs/feed": "^2.0.0",
"@nuxtjs/fontaine": "^0.4.1",
"@nuxtjs/google-fonts": "^3.2.0",
"axios": "^1.6.8",
"modern-css-reset": "^1.4.0",
"nuxt": "^3.11.1",
"nuxt-og-image": "^2.2.4",
Expand All @@ -32,6 +34,7 @@
"devDependencies": {
"@nuxt/eslint-config": "^0.2.0",
"@nuxthq/studio": "^1.0.13",
"@nuxtjs/sitemap": "^5.1.2",
"@vueuse/core": "^10.9.0",
"eslint": "^8.57.0",
"only-allow": "^1.2.1",
Expand Down
Loading

0 comments on commit 264b1ee

Please sign in to comment.