diff --git a/content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning.md b/content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning.md index b999a9491f9f..20c7e22d955c 100644 --- a/content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning.md +++ b/content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning.md @@ -70,13 +70,13 @@ You can customize your {% data variables.product.prodname_codeql %} analysis by {% ifversion ghas-products %} - ![Screenshot of the "{% data variables.product.UI_code_security_scanning %}" section of "{% data variables.product.UI_advanced_security %}" settings. The "Advanced setup" button is highlighted with an orange outline.](/assets/images/help/security/advanced-code-scanning-setup.png) + ![Screenshot of the "{% data variables.product.UI_code_security_scanning %}" section of "{% data variables.product.UI_advanced_security %}" settings. The "Advanced setup" button is highlighted with an orange outline.](/assets/images/help/security/advanced-code-scanning-setup-ghas.png) {% else %} - ![Screenshot of the "{% data variables.product.prodname_code_scanning_caps %}" section of "{% data variables.product.UI_advanced_security %}" settings. The "Advanced setup" button is highlighted with an orange outline.](/assets/images/help/security/advanced-code-scanning-setup-ghas.png) + ![Screenshot of the "{% data variables.product.prodname_code_scanning_caps %}" section of "{% data variables.product.UI_advanced_security %}" settings. The "Advanced setup" button is highlighted with an orange outline.](/assets/images/help/security/advanced-code-scanning-setup.png) - {% endif %} + {% endif %} 1. To customize how {% data variables.product.prodname_code_scanning %} scans your code, edit the workflow. diff --git a/content/copilot/tutorials/coding-agent/get-the-best-results.md b/content/copilot/tutorials/coding-agent/get-the-best-results.md index 0e0cb3689240..b4106ee60150 100644 --- a/content/copilot/tutorials/coding-agent/get-the-best-results.md +++ b/content/copilot/tutorials/coding-agent/get-the-best-results.md @@ -17,6 +17,8 @@ redirect_from: - /copilot/how-tos/agents/copilot-coding-agent/best-practices-for-using-copilot-to-work-on-tasks - /copilot/tutorials/coding-agent/best-practices contentType: tutorials +category: + - Automate simple user stories --- > [!NOTE] diff --git a/content/copilot/tutorials/coding-agent/pilot-coding-agent.md b/content/copilot/tutorials/coding-agent/pilot-coding-agent.md index 57a8f8c9fc13..f249136968a0 100644 --- a/content/copilot/tutorials/coding-agent/pilot-coding-agent.md +++ b/content/copilot/tutorials/coding-agent/pilot-coding-agent.md @@ -13,6 +13,8 @@ redirect_from: - /copilot/tutorials/rolling-out-github-copilot-at-scale/enabling-developers/using-copilot-coding-agent-in-org - /copilot/tutorials/pilot-copilot-coding-agent contentType: tutorials +category: + - Automate simple user stories --- diff --git a/content/copilot/tutorials/compare-ai-models.md b/content/copilot/tutorials/compare-ai-models.md index 10616b3c1444..68343c5ecfca 100644 --- a/content/copilot/tutorials/compare-ai-models.md +++ b/content/copilot/tutorials/compare-ai-models.md @@ -11,6 +11,8 @@ redirect_from: - /copilot/using-github-copilot/ai-models/comparing-ai-models-using-different-tasks - /copilot/tutorials/comparing-ai-models-using-different-tasks contentType: tutorials +category: + - Rapid prototyping --- ## Overview diff --git a/content/copilot/tutorials/enhance-agent-mode-with-mcp.md b/content/copilot/tutorials/enhance-agent-mode-with-mcp.md index 3ba5993c11ba..ad9bc80d5032 100644 --- a/content/copilot/tutorials/enhance-agent-mode-with-mcp.md +++ b/content/copilot/tutorials/enhance-agent-mode-with-mcp.md @@ -10,6 +10,8 @@ topics: redirect_from: - /copilot/tutorials/enhancing-copilot-agent-mode-with-mcp contentType: tutorials +category: + - Automate simple user stories --- {% data reusables.copilot.mcp-availability-and-preview-note %} diff --git a/content/copilot/tutorials/explore-a-codebase.md b/content/copilot/tutorials/explore-a-codebase.md index c68508456bbf..c03e833891c5 100644 --- a/content/copilot/tutorials/explore-a-codebase.md +++ b/content/copilot/tutorials/explore-a-codebase.md @@ -10,6 +10,8 @@ redirect_from: - /copilot/using-github-copilot/guides-on-using-github-copilot/using-copilot-to-explore-a-codebase - /copilot/tutorials/using-copilot-to-explore-a-codebase contentType: tutorials +category: + - Scale institutional knowledge --- ## Introduction diff --git a/content/copilot/tutorials/explore-issues-and-discussions.md b/content/copilot/tutorials/explore-issues-and-discussions.md index 6a634cf90710..f9582ab001f4 100644 --- a/content/copilot/tutorials/explore-issues-and-discussions.md +++ b/content/copilot/tutorials/explore-issues-and-discussions.md @@ -9,6 +9,8 @@ versions: redirect_from: - /copilot/tutorials/using-copilot-to-explore-issues-and-discussions contentType: tutorials +category: + - Scale institutional knowledge --- ## Introduction diff --git a/content/copilot/tutorials/explore-pull-requests.md b/content/copilot/tutorials/explore-pull-requests.md index 3aae6593960a..6380c25ebea2 100644 --- a/content/copilot/tutorials/explore-pull-requests.md +++ b/content/copilot/tutorials/explore-pull-requests.md @@ -9,6 +9,8 @@ versions: redirect_from: - /copilot/tutorials/using-copilot-to-explore-pull-requests contentType: tutorials +category: + - Accelerate PR velocity --- ## Introduction diff --git a/content/copilot/tutorials/index.md b/content/copilot/tutorials/index.md index 1af1d09d5dda..d33b5d63439e 100644 --- a/content/copilot/tutorials/index.md +++ b/content/copilot/tutorials/index.md @@ -30,4 +30,10 @@ children: redirect_from: - /copilot/using-github-copilot/guides-on-using-github-copilot contentType: tutorials +heroImage: /assets/images/banner-images/hero-3.png +layout: bespoke-landing +recommended: + - /copilot/tutorials/copilot-chat-cookbook + - /copilot/tutorials/customization-library + - /copilot/tutorials/roll-out-at-scale --- diff --git a/content/copilot/tutorials/learn-a-new-language.md b/content/copilot/tutorials/learn-a-new-language.md index 2a59a33f67d4..4e88c3495169 100644 --- a/content/copilot/tutorials/learn-a-new-language.md +++ b/content/copilot/tutorials/learn-a-new-language.md @@ -9,6 +9,8 @@ versions: redirect_from: - /copilot/tutorials/learning-a-new-programming-language-with-github-copilot contentType: tutorials +category: + - Scale institutional knowledge --- ## Introduction diff --git a/content/copilot/tutorials/migrate-a-project.md b/content/copilot/tutorials/migrate-a-project.md index d7fd0713761b..341144dc3df0 100644 --- a/content/copilot/tutorials/migrate-a-project.md +++ b/content/copilot/tutorials/migrate-a-project.md @@ -11,6 +11,8 @@ redirect_from: - /copilot/using-github-copilot/guides-on-using-github-copilot/using-copilot-to-migrate-a-project - /copilot/tutorials/using-copilot-to-migrate-a-project contentType: tutorials +category: + - Burn down tech debt --- ## Introduction diff --git a/content/copilot/tutorials/modernize-legacy-code.md b/content/copilot/tutorials/modernize-legacy-code.md index 5335a006cfba..d196745adc27 100644 --- a/content/copilot/tutorials/modernize-legacy-code.md +++ b/content/copilot/tutorials/modernize-legacy-code.md @@ -10,6 +10,8 @@ redirect_from: - /copilot/using-github-copilot/guides-on-using-github-copilot/modernizing-legacy-code-with-github-copilot - /copilot/tutorials/modernizing-legacy-code-with-github-copilot contentType: tutorials +category: + - Modernize applications --- > [!NOTE] The responses shown in this article are examples. {% data variables.copilot.copilot_chat_short %} responses are non-deterministic, so you may get different responses from the ones shown here. diff --git a/content/copilot/tutorials/plan-a-project.md b/content/copilot/tutorials/plan-a-project.md index e33b241cd7ea..7f010e7ddbc4 100644 --- a/content/copilot/tutorials/plan-a-project.md +++ b/content/copilot/tutorials/plan-a-project.md @@ -11,6 +11,8 @@ versions: feature: copilot contentType: tutorials +category: + - Unblock complex work --- > [!NOTE] diff --git a/content/copilot/tutorials/refactor-code.md b/content/copilot/tutorials/refactor-code.md index c108be859ad9..b8a8dafbe6ff 100644 --- a/content/copilot/tutorials/refactor-code.md +++ b/content/copilot/tutorials/refactor-code.md @@ -11,6 +11,8 @@ redirect_from: - /copilot/tutorials/refactoring-code-with-github-copilot shortTitle: Refactor code contentType: tutorials +category: + - Modernize applications --- ## Introduction diff --git a/content/copilot/tutorials/review-ai-generated-code.md b/content/copilot/tutorials/review-ai-generated-code.md index db4ead2a42e7..8614e3acbdec 100644 --- a/content/copilot/tutorials/review-ai-generated-code.md +++ b/content/copilot/tutorials/review-ai-generated-code.md @@ -4,14 +4,9 @@ shortTitle: Review AI code intro: 'Learn techniques to verify and validate AI-generated code, and how {% data variables.copilot.copilot_chat_short %} can help.' versions: feature: copilot -category: - - Refactoring code -complexity: - - Simple -octicon: rocket -topics: - - Copilot contentType: tutorials +category: + - Automate simple user stories --- Reviewing code generated by AI tools like {% data variables.product.prodname_copilot %}, ChatGPT, or other coding agents is becoming an essential part of the modern developer workflow. This guide provides practical techniques, emphasizes the importance of human oversight and testing, and includes example prompts to showcase how AI can assist in the review process. diff --git a/content/copilot/tutorials/roll-out-at-scale/assign-licenses/remind-inactive-users.md b/content/copilot/tutorials/roll-out-at-scale/assign-licenses/remind-inactive-users.md index f571e6ccc0bc..b7179be082ad 100644 --- a/content/copilot/tutorials/roll-out-at-scale/assign-licenses/remind-inactive-users.md +++ b/content/copilot/tutorials/roll-out-at-scale/assign-licenses/remind-inactive-users.md @@ -17,6 +17,8 @@ redirect_from: - /copilot/tutorials/rolling-out-github-copilot-at-scale/assigning-licenses/remind-inactive-users - /copilot/tutorials/rolling-out-github-copilot-at-scale/assign-licenses/remind-inactive-users contentType: tutorials +category: + - Roll Copilot out at scale --- When you're rolling out {% data variables.product.prodname_copilot %} in a business, it's important to keep track of which users are using their {% data variables.product.prodname_copilot_short %} license, so you can respond effectively by reassigning unused licenses or helping people to get started with {% data variables.product.prodname_copilot_short %}. diff --git a/content/copilot/tutorials/roll-out-at-scale/assign-licenses/set-up-self-serve-licenses.md b/content/copilot/tutorials/roll-out-at-scale/assign-licenses/set-up-self-serve-licenses.md index c7066676b233..752d8d1c3d36 100644 --- a/content/copilot/tutorials/roll-out-at-scale/assign-licenses/set-up-self-serve-licenses.md +++ b/content/copilot/tutorials/roll-out-at-scale/assign-licenses/set-up-self-serve-licenses.md @@ -13,6 +13,8 @@ redirect_from: - /copilot/tutorials/rolling-out-github-copilot-at-scale/assigning-licenses/set-up-self-serve-licenses - /copilot/tutorials/rolling-out-github-copilot-at-scale/assign-licenses/set-up-self-serve-licenses contentType: tutorials +category: + - Roll Copilot out at scale --- When you've enabled {% data variables.product.prodname_copilot %} in an organization or enterprise, you can set up a self-serve workflow to allow users to request licenses. This allows you to allocate licenses to people who want them, and means people can get started with {% data variables.product.prodname_copilot_short %} quickly. diff --git a/content/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/accelerate-pull-requests.md b/content/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/accelerate-pull-requests.md index 3729614d8ef6..ea7fae41bbae 100644 --- a/content/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/accelerate-pull-requests.md +++ b/content/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/accelerate-pull-requests.md @@ -10,6 +10,8 @@ redirect_from: - /copilot/tutorials/rolling-out-github-copilot-at-scale/driving-downstream-impact/accelerate-pull-requests - /copilot/tutorials/rolling-out-github-copilot-at-scale/drive-downstream-impact/accelerate-pull-requests contentType: tutorials +category: + - Accelerate PR velocity --- {% data reusables.copilot.essp-intro %} diff --git a/content/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/increase-test-coverage.md b/content/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/increase-test-coverage.md index be269a55c43c..1b8e0a4c36f9 100644 --- a/content/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/increase-test-coverage.md +++ b/content/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/increase-test-coverage.md @@ -10,6 +10,8 @@ redirect_from: - /copilot/tutorials/rolling-out-github-copilot-at-scale/driving-downstream-impact/increase-test-coverage - /copilot/tutorials/rolling-out-github-copilot-at-scale/drive-downstream-impact/increase-test-coverage contentType: tutorials +category: + - Roll Copilot out at scale --- {% data reusables.copilot.essp-intro %} diff --git a/content/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/reduce-security-debt.md b/content/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/reduce-security-debt.md index 9c1a669c61bc..41a5fd1c458a 100644 --- a/content/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/reduce-security-debt.md +++ b/content/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/reduce-security-debt.md @@ -10,6 +10,8 @@ redirect_from: - /copilot/tutorials/rolling-out-github-copilot-at-scale/driving-downstream-impact/reduce-security-debt - /copilot/tutorials/rolling-out-github-copilot-at-scale/drive-downstream-impact/reduce-security-debt contentType: tutorials +category: + - Roll Copilot out at scale --- {% data reusables.copilot.essp-intro %} diff --git a/content/copilot/tutorials/roll-out-at-scale/enable-developers/drive-adoption.md b/content/copilot/tutorials/roll-out-at-scale/enable-developers/drive-adoption.md index 1aecfc974351..20829fe3ade2 100644 --- a/content/copilot/tutorials/roll-out-at-scale/enable-developers/drive-adoption.md +++ b/content/copilot/tutorials/roll-out-at-scale/enable-developers/drive-adoption.md @@ -13,6 +13,8 @@ redirect_from: - /copilot/tutorials/rolling-out-github-copilot-at-scale/enabling-developers/drive-adoption - /copilot/tutorials/rolling-out-github-copilot-at-scale/enable-developers/drive-adoption contentType: tutorials +category: + - Roll Copilot out at scale --- An effective enablement process is essential to drive adoption of {% data variables.product.prodname_copilot_short %} in your organization. This process should be tailored to your organization's needs and goals, and should be designed to help your teams understand how to use {% data variables.product.prodname_copilot_short %} effectively. diff --git a/content/copilot/tutorials/roll-out-at-scale/enable-developers/integrate-ai-agents.md b/content/copilot/tutorials/roll-out-at-scale/enable-developers/integrate-ai-agents.md index e00bd66f11bd..11db61488d0f 100644 --- a/content/copilot/tutorials/roll-out-at-scale/enable-developers/integrate-ai-agents.md +++ b/content/copilot/tutorials/roll-out-at-scale/enable-developers/integrate-ai-agents.md @@ -13,6 +13,8 @@ redirect_from: - /copilot/tutorials/rolling-out-github-copilot-at-scale/enabling-developers/integrate-ai-agents - /copilot/tutorials/rolling-out-github-copilot-at-scale/enable-developers/integrate-ai-agents contentType: tutorials +category: + - Roll Copilot out at scale --- ## About AI agents on {% data variables.product.github %} diff --git a/content/copilot/tutorials/roll-out-at-scale/measure-adoption/analyze-usage-over-time.md b/content/copilot/tutorials/roll-out-at-scale/measure-adoption/analyze-usage-over-time.md index 40ff9f7e359d..61b556e23cbf 100644 --- a/content/copilot/tutorials/roll-out-at-scale/measure-adoption/analyze-usage-over-time.md +++ b/content/copilot/tutorials/roll-out-at-scale/measure-adoption/analyze-usage-over-time.md @@ -17,6 +17,8 @@ layout: inline topics: - Copilot contentType: tutorials +category: + - Roll Copilot out at scale --- ## Introduction diff --git a/content/copilot/tutorials/spark/build-apps-with-spark.md b/content/copilot/tutorials/spark/build-apps-with-spark.md index 38301443d9ec..77fdf7fcb688 100644 --- a/content/copilot/tutorials/spark/build-apps-with-spark.md +++ b/content/copilot/tutorials/spark/build-apps-with-spark.md @@ -12,6 +12,8 @@ redirect_from: - /copilot/tutorials/building-ai-app-prototypes - /copilot/tutorials/build-apps-with-spark contentType: tutorials +category: + - Rapid prototyping --- > [!NOTE] diff --git a/content/copilot/tutorials/spark/prompt-tips.md b/content/copilot/tutorials/spark/prompt-tips.md index c5c44686c34a..ddfccd9baacf 100644 --- a/content/copilot/tutorials/spark/prompt-tips.md +++ b/content/copilot/tutorials/spark/prompt-tips.md @@ -7,6 +7,8 @@ versions: feature: spark product: 'Anyone with a {% data variables.copilot.copilot_pro_plus_short %} or {% data variables.copilot.copilot_enterprise_short %} license can use {% data variables.product.prodname_spark_short %}.' contentType: tutorials +category: + - Rapid prototyping --- ## Introduction diff --git a/content/copilot/tutorials/spark/your-first-spark.md b/content/copilot/tutorials/spark/your-first-spark.md index a7786ad4e477..9ff577ee672c 100644 --- a/content/copilot/tutorials/spark/your-first-spark.md +++ b/content/copilot/tutorials/spark/your-first-spark.md @@ -9,6 +9,8 @@ redirect_from: - /copilot/tutorials/building-your-first-app-in-minutes-with-github-spark - /copilot/tutorials/spark/easy-apps-with-spark contentType: tutorials +category: + - Rapid prototyping --- Have you ever had a great idea for an app, but you didn't have the tools to build it? With the help of AI, you can now bring your app ideas to life in minutes using only natural language. In this article, we'll use {% data variables.product.prodname_spark %} to build, improve, and share a word search app without writing a single line of code ourselves. diff --git a/content/copilot/tutorials/speed-up-development-work.md b/content/copilot/tutorials/speed-up-development-work.md index 2c346409f10a..6f006c28a141 100644 --- a/content/copilot/tutorials/speed-up-development-work.md +++ b/content/copilot/tutorials/speed-up-development-work.md @@ -11,6 +11,8 @@ redirect_from: - /copilot/using-github-copilot/copilot-spaces/speeding-up-development-work-with-copilot-spaces - /copilot/tutorials/speeding-up-development-work-with-copilot-spaces contentType: tutorials +category: + - Accelerate PR velocity --- If you're starting a new feature, trying to understand a system, or picking up a task in a codebase you’re still learning, {% data variables.copilot.copilot_spaces %} can help you: diff --git a/content/copilot/tutorials/try-extensions.md b/content/copilot/tutorials/try-extensions.md index 7b1c4a1ce5a1..0a9461da2f57 100644 --- a/content/copilot/tutorials/try-extensions.md +++ b/content/copilot/tutorials/try-extensions.md @@ -14,6 +14,8 @@ topics: - Copilot shortTitle: Try Extensions contentType: tutorials +category: + - Rapid prototyping --- The [Blackbeard extension](https://github.com/copilot-extensions/blackbeard-extension) is a {% data variables.copilot.copilot_extension %} that comprises a {% data variables.product.prodname_github_app %} and a {% data variables.product.prodname_copilot_short %} agent. The agent responds to chat requests in the style of a pirate, using {% data variables.product.prodname_copilot_short %}'s large language model (LLM) API and special system prompts. See [AUTOTITLE](/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/about-copilot-agents). diff --git a/content/copilot/tutorials/upgrade-projects.md b/content/copilot/tutorials/upgrade-projects.md index 78293facf281..5bcc9ea7f19a 100644 --- a/content/copilot/tutorials/upgrade-projects.md +++ b/content/copilot/tutorials/upgrade-projects.md @@ -11,6 +11,8 @@ redirect_from: - /copilot/tutorials/upgrading-java-projects-with-github-copilot - /copilot/tutorials/upgrading-projects-with-github-copilot contentType: tutorials +category: + - Burn down tech debt --- > [!NOTE] diff --git a/content/copilot/tutorials/write-tests.md b/content/copilot/tutorials/write-tests.md index d7afa2ce156d..56883587ea3e 100644 --- a/content/copilot/tutorials/write-tests.md +++ b/content/copilot/tutorials/write-tests.md @@ -11,6 +11,8 @@ redirect_from: - /copilot/tutorials/writing-tests-with-github-copilot shortTitle: Write tests contentType: tutorials +category: + - Improve quality and maintainability --- ## Introduction diff --git a/content/enterprise-onboarding/index.md b/content/enterprise-onboarding/index.md index 9dcfd54bd3e4..7e9dcfe4bb23 100644 --- a/content/enterprise-onboarding/index.md +++ b/content/enterprise-onboarding/index.md @@ -1,9 +1,6 @@ --- title: Enterprise onboarding intro: 'Learn how to successfully onboard your company to {% data variables.product.prodname_ghe_cloud %}.' -introLinks: - overview: '/enterprise-onboarding/getting-started-with-your-enterprise' - try_ghec_for_free: 'https://github.com/account/enterprises/new?ref_product=ghec&ref_type=trial&ref_style=button&ref_plan=enterprise' featuredLinks: startHere: - '/enterprise-onboarding/getting-started-with-your-enterprise' @@ -12,7 +9,7 @@ featuredLinks: popular: - '/enterprise-onboarding/github-actions-for-your-enterprise' - '/enterprise-onboarding/feature-enhancements' -layout: product-landing +layout: journey-landing journeyTracks: - id: 'getting_started' title: 'Getting started with your enterprise' diff --git a/content/site-policy/github-terms/github-dpa-previews.md b/content/site-policy/github-terms/github-dpa-previews.md index 91c5d24e4476..64473de06d5c 100644 --- a/content/site-policy/github-terms/github-dpa-previews.md +++ b/content/site-policy/github-terms/github-dpa-previews.md @@ -14,6 +14,4 @@ The pre-release products and features listed below use data handling that is the | Product / Feature | DPA Coverage Date | |:---------------------------------------------------|:-------------------:| -| Copilot CLI | 28 October 2025 | -| Copilot Enterprise & Users Usage Metrics Dashboard | 28 October 2025 | -| Spark | 28 October 2025 | +| Coming Soon! | 27 October 2025 | diff --git a/src/content-linter/lib/linting-rules/frontmatter-landing-recommended.ts b/src/content-linter/lib/linting-rules/frontmatter-landing-recommended.ts index d1dd31c11859..e3e06382d6bb 100644 --- a/src/content-linter/lib/linting-rules/frontmatter-landing-recommended.ts +++ b/src/content-linter/lib/linting-rules/frontmatter-landing-recommended.ts @@ -12,18 +12,36 @@ function isValidArticlePath(articlePath: string, currentFilePath: string): boole // Strategy 1: Always try as an absolute path from content root first const contentDir = path.join(ROOT, 'content') const normalizedPath = articlePath.startsWith('/') ? articlePath.substring(1) : articlePath - const absolutePath: string = path.join(contentDir, `${normalizedPath}.md`) + // Check for direct .md file + const absolutePath: string = path.join(contentDir, `${normalizedPath}.md`) if (fs.existsSync(absolutePath) && fs.statSync(absolutePath).isFile()) { return true } + // Check for index.md file in directory (for landing pages) + const indexPath: string = path.join(contentDir, normalizedPath, 'index.md') + if (fs.existsSync(indexPath) && fs.statSync(indexPath).isFile()) { + return true + } + // Strategy 2: Fall back to relative path from current file's directory const currentDir: string = path.dirname(currentFilePath) + + // Check for relative .md file const relativePath: string = path.join(currentDir, `${normalizedPath}.md`) + try { + if (fs.existsSync(relativePath) && fs.statSync(relativePath).isFile()) { + return true + } + } catch { + // Continue to next strategy + } + // Check for relative index.md file + const relativeIndexPath: string = path.join(currentDir, normalizedPath, 'index.md') try { - return fs.existsSync(relativePath) && fs.statSync(relativePath).isFile() + return fs.existsSync(relativeIndexPath) && fs.statSync(relativeIndexPath).isFile() } catch { return false } diff --git a/src/content-linter/lib/linting-rules/journey-tracks-guide-path-exists.ts b/src/content-linter/lib/linting-rules/journey-tracks-guide-path-exists.ts index d728b6055111..3d9ef099c88b 100644 --- a/src/content-linter/lib/linting-rules/journey-tracks-guide-path-exists.ts +++ b/src/content-linter/lib/linting-rules/journey-tracks-guide-path-exists.ts @@ -13,18 +13,36 @@ function isValidGuidePath(guidePath: string, currentFilePath: string): boolean { // Strategy 1: Always try as an absolute path from content root first const contentDir = path.join(ROOT, 'content') const normalizedPath = guidePath.startsWith('/') ? guidePath.substring(1) : guidePath - const absolutePath = path.join(contentDir, `${normalizedPath}.md`) + // Check for direct .md file + const absolutePath = path.join(contentDir, `${normalizedPath}.md`) if (fs.existsSync(absolutePath) && fs.statSync(absolutePath).isFile()) { return true } + // Check for index.md file in directory (for landing pages) + const indexPath = path.join(contentDir, normalizedPath, 'index.md') + if (fs.existsSync(indexPath) && fs.statSync(indexPath).isFile()) { + return true + } + // Strategy 2: Fall back to relative path from current file's directory const currentDir = path.dirname(currentFilePath) + + // Check for relative .md file const relativePath = path.join(currentDir, `${normalizedPath}.md`) + try { + if (fs.existsSync(relativePath) && fs.statSync(relativePath).isFile()) { + return true + } + } catch { + // Continue to next strategy + } + // Check for relative index.md file + const relativeIndexPath = path.join(currentDir, normalizedPath, 'index.md') try { - return fs.existsSync(relativePath) && fs.statSync(relativePath).isFile() + return fs.existsSync(relativeIndexPath) && fs.statSync(relativeIndexPath).isFile() } catch { return false } diff --git a/src/content-linter/tests/fixtures/landing-recommended/valid-landing.md b/src/content-linter/tests/fixtures/landing-recommended/valid-landing.md index ce2a471c571e..09d5956c5ca0 100644 --- a/src/content-linter/tests/fixtures/landing-recommended/valid-landing.md +++ b/src/content-linter/tests/fixtures/landing-recommended/valid-landing.md @@ -11,8 +11,9 @@ recommended: - /article-one - /article-two - /subdir/article-three + - /get-started --- # Valid Landing Page -This is a valid landing page with recommended articles. +This is a valid landing page with recommended articles and landing page paths.