Skip to content

Comments

Fix enterprise category not generating HTML pages#46

Merged
brunoborges merged 4 commits intomainfrom
copilot/fix-enterprise-category-slug
Feb 19, 2026
Merged

Fix enterprise category not generating HTML pages#46
brunoborges merged 4 commits intomainfrom
copilot/fix-enterprise-category-slug

Conversation

Copy link
Contributor

Copilot AI commented Feb 19, 2026

generate.java (used by the deploy workflow) was missing "enterprise" from its CATEGORY_DISPLAY map. Since loadAllSnippets() iterates over CATEGORY_DISPLAY.sequencedKeySet(), the entire content/enterprise/ directory was silently skipped — no index cards and no detail pages were ever generated for enterprise patterns.

Changes

  • html-generators/categories.properties — New file that serves as the single source of truth for category ID-to-display-name mappings; adding a new category now only requires editing this one file
  • html-generators/generate.java — Replaced hardcoded CATEGORY_DISPLAY map with a loadCategoryDisplay() method that reads from categories.properties
  • html-generators/generate.py — Replaced hardcoded CATEGORY_DISPLAY dict and inline category list with a load_category_display() function that reads from categories.properties; load_all_snippets() now iterates over CATEGORY_DISPLAY.keys() instead of a separate hardcoded list
  • .gitignore — Add site/enterprise/*.html to align with all other category HTML files (generated artifacts, not source-controlled); remove the four previously-committed enterprise HTML files from tracking
Original prompt

This section details on the original issue you should resolve

<issue_title>Enterprise category not showing any slug</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix enterprise category not showing any slug Fix enterprise category not generating HTML pages Feb 19, 2026
@javaevolved javaevolved deleted a comment from Copilot AI Feb 19, 2026
@brunoborges
Copy link
Contributor

@copilot let's externalize the category display map to an external properties file that can be easily consumed by the java and python generators.

Copy link
Contributor Author

Copilot AI commented Feb 19, 2026

@copilot let's externalize the category display map to an external properties file that can be easily consumed by the java and python generators.

Done in commit 7779949. Created html-generators/categories.properties as the single source of truth:

language=Language
collections=Collections
strings=Streams
...
enterprise=Enterprise

Both generate.java and generate.py now read from this file at build time — adding a new category only requires editing the properties file.

@brunoborges brunoborges marked this pull request as ready for review February 19, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enterprise category not showing any slug

2 participants