diff --git a/.github/actions/spell-checker/ignore_words.txt b/.github/actions/spell-checker/ignore_words.txt index c235190e..228d29b9 100755 --- a/.github/actions/spell-checker/ignore_words.txt +++ b/.github/actions/spell-checker/ignore_words.txt @@ -1,5 +1,4 @@ 2fa -8Fdevelop 8f 8fdevelop astro @@ -26,25 +25,21 @@ customtitlesbydirectoryname customTitlesByDirectoryName ddos dev -Develop develop -Development development devs dns dnslink ef env -EnvVars envvars ethereum eu -️Fleek fleek +fleek's fleekchangelog01mar11 fleekreleasenotes06 fleekxyz -fleek’s flkservices fmt gatsby @@ -69,13 +64,10 @@ lon md mdx meilisearch -Meilisearch's metamask mp4 -NavBar navbar nodejs -NodeJS npm openinnewtab openInNewTab @@ -96,7 +88,6 @@ sdk signups src srcset -SrcSet stylesheets submenu submenus @@ -106,7 +97,6 @@ tld todo totp txt -TypeScript typescript ui url @@ -117,25 +107,20 @@ walkthrough webp xyz onchain -onchain serverless testnet latencygraphic onchain geo serverless -Vercel +vercel permissionless onchain deplatform -APIs -serverless +apis serverless -users’ -Functions’ +users' +functions' lodash repos -users’ -development -everytime -develop +users' diff --git a/.github/workflows/grammar-spell-checker.yml b/.github/workflows/grammar-spell-checker.yml index 0e9645e9..4055fa9a 100644 --- a/.github/workflows/grammar-spell-checker.yml +++ b/.github/workflows/grammar-spell-checker.yml @@ -14,6 +14,10 @@ jobs: with: fetch-depth: 0 + - uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + - name: Install Hunspell run: | sudo apt-get update @@ -31,9 +35,15 @@ jobs: echo for file in $diff; do - output=$(hunspell -l -d en_US -p .github/actions/spell-checker/ignore_words.txt "$file") + normalizedFile=$(mktemp) + + ./scripts/markdown-normalizer.ts "$file" > "$normalizedFile" + + output=$(hunspell -l -d en_US -p .github/actions/spell-checker/ignore_words.txt "$normalizedFile") typos_count=$(echo "$output" | wc -l) + rm "$normalizedFile" + if [[ -n "$output" ]]; then echo "🤓 Found the following typos in $file" echo diff --git a/scripts/markdown-normalizer.ts b/scripts/markdown-normalizer.ts new file mode 100755 index 00000000..56c8f712 --- /dev/null +++ b/scripts/markdown-normalizer.ts @@ -0,0 +1,32 @@ +#!/usr/bin/env bun + +import fs from 'fs'; + +if (!process.argv.slice(1).length) { + console.error("👹 Oops! Missing the filename argument."); + process.exit(1); +} + +const args = process.argv.slice(1); +const filePath = args[1]; +const fileContent = fs.readFileSync(filePath, 'utf-8'); + +// Markdown headings +const re1 = /---[\s\S]*?---/g; +// Code blocks +const re2 = /```[\s\S]*?```/g; +// Named URL +const re3 = /\[.*?\]\(.*?\)/g; + +try { + const content = fileContent + .replace(re1, '') + .replace(re2, '') + .replace(re3, '') + .toLowerCase(); + + process.stdout.write(content); +} catch (err) { + console.error("👹 Oops! Failed to normalize the file for some reason..."); + process.exit(1); +} diff --git a/src/components/Footer/config.ts b/src/components/Footer/config.ts index 30019c86..f720c1b3 100644 --- a/src/components/Footer/config.ts +++ b/src/components/Footer/config.ts @@ -4,8 +4,10 @@ const { careersUrl, supportExternalUrl, reportAbuseUrl, - discordFleekCommunityUrl, statusURl, + mediaKit, + fleekNetworkWebsiteUrl, + templatesUrl, } = settings.site.resources; const { fleekPlatformOrgUrl } = settings.github; @@ -15,19 +17,19 @@ export default { developers: [ { text: 'Fleek Network', - url: 'https://fleek.network/', + url: fleekNetworkWebsiteUrl, target: '_blank', rel: 'noopener noreferrer', }, { - text: 'Github', - url: 'https://github.com/fleek-platform', + text: 'Changelog', + url: '/blog/changelog', target: '_blank', rel: 'noopener noreferrer', }, { - text: 'Changelog', - url: '/blog/changelog', + text: 'Github', + url: fleekPlatformOrgUrl, target: '_blank', rel: 'noopener noreferrer', }, @@ -38,21 +40,29 @@ export default { rel: 'noopener noreferrer', }, ], - legal: [ + company: [ { - text: 'Terms of Service', - url: '/legal/terms-of-service', + text: 'Blog', + url: '/blog', }, { - text: 'Privacy Policies', - url: '/legal/privacy-policy', + text: 'Pricing', + url: '/pricing', }, { - text: 'Report Abuse', - url: reportAbuseUrl, + text: 'Careers', + url: careersUrl, target: '_blank', rel: 'noopener noreferrer', }, + { + text: 'Terms of Service', + url: '/legal/terms-of-service', + }, + { + text: 'Privacy Policies', + url: '/legal/privacy-policy', + }, { text: 'Contact Us', url: reportAbuseUrl, @@ -75,29 +85,37 @@ export default { }, { text: 'Templates', - url: 'https://app.fleek.xyz/templates', + url: templatesUrl, target: '_blank', rel: 'noopener noreferrer', }, ], resources: [ { - text: 'Blog', - url: '/blog', - }, - { - text: 'Docs', + text: 'Documentation', url: '/docs', }, { text: 'Media Kit', - url: 'https://fleek.notion.site/Fleek-Brand-Kit-9a2bcf7eb40740a9b7e951fc951b478a', + url: mediaKit, target: '_blank', rel: 'noopener noreferrer', }, { - text: 'Careers', - url: careersUrl, + text: 'Guides', + url: '/guides', + }, + { + text: 'Support', + url: supportExternalUrl, + target: '_blank', + rel: 'noopener noreferrer', + }, + { + text: 'Report Abuse', + url: reportAbuseUrl, + target: '_blank', + rel: 'noopener noreferrer', }, ], }; diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx index 197ba841..d51d0920 100644 --- a/src/components/Footer/index.tsx +++ b/src/components/Footer/index.tsx @@ -7,7 +7,7 @@ import Link, { Target } from '@components/Link'; import config from './config'; import { FaXTwitter } from 'react-icons/fa6'; -const { product, developers, legal, resources, fleekPlatformOrgUrl } = config; +const { product, developers, company, resources, fleekPlatformOrgUrl } = config; const Footer = () => { return ( @@ -108,9 +108,9 @@ const Footer = () => {
- Legal + Company