Skip to content

Commit

Permalink
chore: Improving SEO settings for page
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-logan committed May 26, 2024
1 parent 61cefc5 commit 075f9de
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 0 deletions.
51 changes: 51 additions & 0 deletions docs/src/app/manifest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { MetadataRoute } from "next";

export default function manifest(): MetadataRoute.Manifest {
return {
name: "Multiform Validator - Your Multilingual Validation Library",
short_name: "Multiform Validator",
description:
"Multilingual library made for validation, various form fields, such as: email, telephone, password, cpf, cnpj, credit card, magic numbers for image mimetype validation and much more.",
start_url: "/",
display: "standalone",
background_color: "#121212",
lang: "en",
dir: "ltr",
categories: [
"utilities",
"development",
"validation",
"form",
"fields",
"email",
"telephone",
"password",
"cpf",
"cnpj",
"credit card",
"magic numbers",
"image",
"mimetype",
"validator",
"multiform",
"validação",
"email-validator",
"multiform-validator",
"javascript",
"npm",
"security",
"safe",
"pentest",
"security-tools",
"Validator",
"validate",
],
icons: [
{
src: "/favicon.ico",
sizes: "256x256",
type: "image/x-icon",
},
],
};
}
11 changes: 11 additions & 0 deletions docs/src/app/robots.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { MetadataRoute } from "next";

export default function robots(): MetadataRoute.Robots {
return {
rules: {
userAgent: "*",
},
sitemap: "https://multiform-validator.3utilities.com/sitemap.xml",
host: "https://multiform-validator.3utilities.com",
};
}
130 changes: 130 additions & 0 deletions docs/src/app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
import { MetadataRoute } from "next";

const hostUrl: string = "https://multiform-validator.3utilities.com";

function generateJsMaps(): MetadataRoute.Sitemap {
const prefix: string = "documentation/js/functions";

const functions: string[] = [
"cnpjIsValid",
"cpfIsValid",
"getOnlyEmail",
"identifyFlagCard",
"isAscii",
"isBase64",
"isCEP",
"isCreditCardValid",
"isDate",
"isDecimal",
"isEmail",
"isEmpty",
"isMACAddress",
"isMD5",
"isNumber",
"isPort",
"isPostalCode",
"isTime",
"isValidAudio",
"isValidImage",
"isValidPdf",
"isValidTxt",
"isValidVideo",
"passwordStrengthTester",
"validateBRPhoneNumber",
"validateEmail",
"validateName",
"validatePassportNumber",
"validatePassword",
"validatePhoneNumber",
"validateSurname",
"validateTextarea",
"validateUsername",
"validateUSPhoneNumber",
];

return functions.map((func) => ({
url: `${hostUrl}/${prefix}/${func}`,
lastModified: new Date(),
changeFrequency: "monthly",
priority: 0.9,
}));
}

export default function sitemap(): MetadataRoute.Sitemap {
return [
{
url: hostUrl,
lastModified: new Date(),
changeFrequency: "monthly",
priority: 0.5,
},
{
url: `${hostUrl}/documentation`,
lastModified: new Date(),
changeFrequency: "monthly",
priority: 0.6,
},
{
url: `${hostUrl}/documentation/py`,
lastModified: new Date(),
changeFrequency: "monthly",
priority: 0.8,
},
{
url: `${hostUrl}/documentation/js`,
lastModified: new Date(),
changeFrequency: "monthly",
priority: 1,
},
{
url: `${hostUrl}/about`,
lastModified: new Date(),
changeFrequency: "monthly",
priority: 0.6,
},
{
url: `${hostUrl}/terms`,
lastModified: new Date(),
changeFrequency: "monthly",
priority: 0.3,
},
{
url: `${hostUrl}/privacity-polices`,
lastModified: new Date(),
changeFrequency: "monthly",
priority: 0.3,
},
{
url: `${hostUrl}/info`,
lastModified: new Date(),
changeFrequency: "monthly",
priority: 0.5,
},
...generateJsMaps(),
];
}

/**
* example:
* {
url: hostUrl,
lastModified: new Date(),
changeFrequency: "monthly",
priority: 1,
alternates: {
languages: {
pt: `${hostUrl}/pt`,
},
},
},
*/

/**
info
documentation
about
terms
privacity-polices
documentation/py
documentation/js
*/

0 comments on commit 075f9de

Please sign in to comment.