Skip to content

Commit

Permalink
chore: clean up links (#571)
Browse files Browse the repository at this point in the history
* chore: cleanup links

* Apply suggestions from code review

Co-authored-by: Alistair Scott <ali.scott@gmail.com>

---------

Co-authored-by: Alistair Scott <ali.scott@gmail.com>
  • Loading branch information
abtx and aliscott authored Oct 18, 2023
1 parent 5d2e0f5 commit f632713
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 92 deletions.
129 changes: 63 additions & 66 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,103 +4,100 @@
require('dotenv').config();

module.exports = {
title: "Infracost",
url: "https://www.infracost.io",
baseUrl: "/docs/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
title: 'Infracost',
url: 'https://www.infracost.io',
baseUrl: '/docs/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
trailingSlash: true,
favicon: "img/favicon.png",
organizationName: "infracost",
projectName: "docs",
favicon: 'img/favicon.png',
organizationName: 'infracost',
projectName: 'docs',
customFields: {
infracostDocsApiToken: process.env.INFRACOST_DOCS_API_TOKEN,
infracostDashboardApiEndpoint: process.env.INFRACOST_DASHBOARD_API_ENDPOINT,
infracostDashboardEndpoint: process.env.INFRACOST_DASHBOARD_ENDPOINT,
},
plugins: [
[
"@docusaurus/plugin-client-redirects",
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
from: "/integrations",
to: "/integrations/github_actions",
from: '/integrations',
to: '/integrations/github_actions',
},
{
from: [
"/environment_variables",
"/integrations/environment_variables",
],
to: "/features/environment_variables",
from: ['/environment_variables', '/integrations/environment_variables'],
to: '/features/environment_variables',
},
{
from: "/infracost_api",
to: "/integrations/infracost_api",
from: '/infracost_api',
to: '/integrations/infracost_api',
},
{
from: "/terraform_cloud_enterprise",
to: "/integrations/terraform_cloud_enterprise",
from: '/terraform_cloud_enterprise',
to: '/integrations/terraform_cloud_enterprise',
},
{
from: "/terragrunt",
to: "/features/terragrunt",
from: '/terragrunt',
to: '/features/terragrunt',
},
{
from: "/config_file",
to: "/features/config_file",
from: '/config_file',
to: '/features/config_file',
},
{
from: "/report",
to: "/features/cli_commands",
from: '/report',
to: '/features/cli_commands',
},
{
from: "/supported_resources",
to: "/supported_resources/overview",
from: '/supported_resources',
to: '/supported_resources/overview',
},
{
from: "/iac_tools/terraform_cloud_enterprise",
to: "/integrations/terraform_cloud_enterprise",
from: '/iac_tools/terraform_cloud_enterprise',
to: '/integrations/terraform_cloud_enterprise',
},
{
from: "/iac_tools/terragrunt",
to: "/features/terragrunt",
from: '/iac_tools/terragrunt',
to: '/features/terragrunt',
},
{
from: "/multi_project/config_file",
to: "/features/config_file",
from: '/multi_project/config_file',
to: '/features/config_file',
},
{
from: "/features/config_file_template/",
to: "/features/config_file",
from: '/features/config_file_template/',
to: '/features/config_file',
},
{
from: "/usage_based_resources/",
to: "/features/usage_based_resources/",
from: '/usage_based_resources/',
to: '/features/usage_based_resources/',
},
{
from: "/multi_project/report",
to: "/features/cli_commands",
from: '/multi_project/report',
to: '/features/cli_commands',
},
{
from: "/terraform_modules",
to: "/features/terraform_modules",
from: '/terraform_modules',
to: '/features/terraform_modules',
},
{
from: "/guides/terraform_modules",
to: "/features/terraform_modules",
from: '/guides/terraform_modules',
to: '/features/terraform_modules',
},
{
from: "/infracost_cloud/overview",
to: "/infracost_cloud/get_started",
from: '/infracost_cloud/overview',
to: '/infracost_cloud/get_started',
},
{
from: "/integrations/jira",
to: "/infracost_cloud/jira_integration",
from: '/integrations/jira',
to: '/infracost_cloud/jira_integration',
},
{
from: "/infracost_cloud/authentication",
to: "/infracost_cloud/key_concepts",
from: '/infracost_cloud/authentication',
to: '/infracost_cloud/key_concepts',
},
{
from: '/infracost_cloud/sso/overview',
Expand All @@ -111,27 +108,27 @@ module.exports = {
],
],
themeConfig: {
image: "docs/img/social-image.png",
image: 'docs/img/social-image.png',
colorMode: {
defaultMode: "light",
defaultMode: 'light',
disableSwitch: true,
respectPrefersColorScheme: false,
},
announcementBar: {
id: "support_us",
id: 'support_us',
content:
'<span class="announcement-message">If you like Infracost, give it a <a target="_blank" rel="noopener noreferrer" href="https://github.com/infracost/infracost">star on GitHub</a>!<img src="/docs/img/icons/star-white.svg" class="star-right" alt="Star icon" /></span>',
backgroundColor: "#2A2A5B",
textColor: "#EBEBF2",
backgroundColor: '#2A2A5B',
textColor: '#EBEBF2',
},
prism: {
theme: require("prism-react-renderer/themes/dracula"),
additionalLanguages: ["hcl"],
theme: require('prism-react-renderer/themes/dracula'),
additionalLanguages: ['hcl'],
},
algolia: {
appId: "ERN68FLCI1",
apiKey: "e62759e664aae55a8bfef8e93ecf6111",
indexName: "infracost",
appId: 'ERN68FLCI1',
apiKey: 'e62759e664aae55a8bfef8e93ecf6111',
indexName: 'infracost',
contextualSearch: false,
searchParameters: {
facetFilters: [],
Expand All @@ -140,22 +137,22 @@ module.exports = {
},
presets: [
[
"@docusaurus/preset-classic",
'@docusaurus/preset-classic',
{
docs: {
routeBasePath: "/",
sidebarPath: require.resolve("./sidebars.js"),
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
editUrl: `https://github.com/infracost/docs/edit/master`,
},
theme: {
customCss: require.resolve("./src/css/index.css"),
customCss: require.resolve('./src/css/index.css'),
},
sitemap: {
changefreq: "weekly",
changefreq: 'weekly',
priority: 0.5,
},
gtag: {
trackingID: "G-9GFV9Z9NNZ",
trackingID: 'G-9GFV9Z9NNZ',
anonymizeIP: true,
},
googleTagManager: {
Expand Down
29 changes: 12 additions & 17 deletions src/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@ function Footer() {
<h1>Documentation</h1>
<ul>
<li>
<a href="/docs">Getting started</a>
<a href="/docs/">Getting started</a>
</li>
<li>
<a href="/docs/integrations/cicd">CI/CD integrations</a>
<a href="/docs/integrations/cicd/">CI/CD integrations</a>
</li>
<li>
<a href="/docs/supported_resources">Supported resources</a>
<a href="/docs/supported_resources/">Supported resources</a>
</li>
<li>
<a href="/docs/support">Support</a>
<a href="/docs/support/">Support</a>
</li>
<li>
<a href="/docs/faq">FAQ</a>
<a href="/docs/faq/">FAQ</a>
</li>
</ul>
</div>
<div className="section">
<h1>Community</h1>
<ul>
<li>
<a href="/community-chat" target="_blank" rel="noreferrer">
<a href="/community-chat/" target="_blank" rel="noreferrer">
Join Slack
</a>
</li>
Expand Down Expand Up @@ -65,22 +65,17 @@ function Footer() {
<h1>Company</h1>
<ul>
<li>
<a href="/about">About</a>
<a href="/about/">About</a>
</li>
<li>
<a href="/join-the-team">Careers</a>
<a href="/blog/">Blog</a>
</li>
<li>
<a href="/blog">Blog</a>
</li>
<li>
<a href="/security">Security</a>
<a href="/security/">Security</a>
</li>
<li></li>
<li>
<a href="mailto:hello@infracost.io" target="_blank" rel="noreferrer">
hello@infracost.io
</a>
<a href="/contact/">Contact Us</a>
</li>
</ul>
</div>
Expand All @@ -92,10 +87,10 @@ function Footer() {
<div className="right">
<ul>
<li>
<a href="/docs/privacy-policy">Privacy policy</a>
<a href="/docs/privacy-policy/">Privacy policy</a>
</li>
<li>
<a href="/docs/terms-of-service">Terms of service</a>
<a href="/docs/terms-of-service/">Terms of service</a>
</li>
</ul>
</div>
Expand Down
18 changes: 9 additions & 9 deletions src/components/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,36 +77,36 @@ function Navbar({ isDocs }) {
groupItems: [
{
label: 'Product Overview',
href: '/products',
href: '/products/',
},
{
label: 'For FinOps',
href: '/finops',
href: '/finops/',
},
],
},
{
label: 'Pricing',
href: '/pricing',
href: '/pricing/',
},
{
label: 'Resources',
groupItems: [
{
label: 'Docs',
href: '/docs',
href: '/docs/',
},
{
label: 'Resource Articles',
href: '/resources',
href: '/resources/',
},
{
label: 'Glossary',
href: 'glossary',
href: '/glossary/',
},
{
label: 'Blog',
href: '/blog',
href: '/blog/',
},
],
},
Expand All @@ -115,11 +115,11 @@ function Navbar({ isDocs }) {
groupItems: [
{
label: 'About Us',
href: '/about',
href: '/about/',
},
{
label: 'Contact Us',
href: '/contact',
href: '/contact/',
},
],
},
Expand Down

0 comments on commit f632713

Please sign in to comment.