From 7c3e436d85d83933e171eb464e1d524f1eabfb03 Mon Sep 17 00:00:00 2001 From: Walidoux Date: Fri, 10 Feb 2023 12:41:47 +0100 Subject: [PATCH] refactor(config): update config + types --- types/{projectConfig.ts => config.ts} | 8 +++----- utils/config.ts | 15 ++++++++------- 2 files changed, 11 insertions(+), 12 deletions(-) rename types/{projectConfig.ts => config.ts} (53%) diff --git a/types/projectConfig.ts b/types/config.ts similarity index 53% rename from types/projectConfig.ts rename to types/config.ts index 6fd8b72..07ef151 100644 --- a/types/projectConfig.ts +++ b/types/config.ts @@ -1,4 +1,4 @@ -type PCKeys = +type SEOKeys = | 'shortName' | 'longName' | 'description' @@ -7,8 +7,6 @@ type PCKeys = | 'defaultLocale' type PCIconsKeys = 'default' | 'image' | 'apple' | '16_16' | '32_32' -type PCProps = Record - -export interface PCDefaultValues extends PCProps { - icons: Record +export interface SEODefaultValues extends Partial> { + icons?: Record } diff --git a/utils/config.ts b/utils/config.ts index a189980..0e2acab 100644 --- a/utils/config.ts +++ b/utils/config.ts @@ -1,11 +1,12 @@ -import { PCDefaultValues } from 'types/projectConfig' +import { SEODefaultValues } from 'types/config' -export const projectConfig: PCDefaultValues = { - shortName: 'Boilerplate', - longName: 'Next.Js Boilerplate', - description: - 'The latest Next.js boilerplate starter code/time saver with Typescript / SCSS. Including linters such as: Prettier, Eslint and Stylelint.', - url: 'Unknown project url', +export const PROJECT_NAME = 'Boilerplate' + +export const SEOConfig: SEODefaultValues = { + shortName: PROJECT_NAME, + longName: `Next.Js ${PROJECT_NAME}`, + description: `My Next.JS ${PROJECT_NAME} with TS - Tailwind CSS and much more.`, + url: 'https://next-app-boilerplate.vercel.app/', defaultLocale: 'en', color: '#775aaa', icons: {