Refactor and add more configuration to src/config.mjs

This commit is contained in:
prototypa
2023-01-06 16:01:06 -05:00
parent ba2b6081ed
commit f6672ce070
8 changed files with 99 additions and 72 deletions

View File

@ -143,44 +143,51 @@ All commands are run from the root of the project, from a terminal:
Basic configuration file: `./src/config.mjs`
```javascript
export const SITE = {
name: 'Example',
const CONFIG = {
name: 'Example',
origin: 'https://example.com',
basePathname: '/', // Change this if you need to deploy to Github Pages, for example
trailingSlash: false, // Generate permalinks with or without "/" at the end
title: 'Example - This is the homepage title of Example',
description: 'This is the homepage description of Example',
title: 'Example - This is the homepage title of Example', // default seo title
description: 'This is the homepage description of Example', // default seo description
defaultImage: "image.jpg", // default seo image
defaultTheme: 'system', // Values: "system" | "light" | "dark" | "light:only" | "dark:only"
googleAnalyticsId: false, // or "G-XXXXXXXXXX",
googleSiteVerificationId: false, // or some value,
};
export const BLOG = {
disabled: false,
postsPerPage: 4,
blog: {
disabled: false,
postsPerPage: 4,
blog: {
disabled: false,
pathname: 'blog', // blog main path, you can change this to "articles" (/articles)
},
list: {
pathname: 'blog', // blog main path, you can change this to "articles" (/articles)
noindex: false,
disabled: false,
},
post: {
disabled: false,
pathname: '', // empty for /some-post, value for /pathname/some-post
},
post: {
pathname: '', // empty for /some-post, value for /pathname/some-post
noindex: false,
disabled: false,
},
category: {
disabled: false,
pathname: 'category', // set empty to change from /category/some-category to /some-category
},
category: {
pathname: 'category', // set empty to change from /category/some-category to /some-category
noindex: true,
disabled: false,
},
tag: {
disabled: false,
pathname: 'tag', // set empty to change from /tag/some-tag to /some-tag
},
};
tag: {
pathname: 'tag', // set empty to change from /tag/some-tag to /some-tag
noindex: true,
disabled: false,
},
},
}
```
<br>