diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-08 23:39:53 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-08 23:39:53 +0300 |
| commit | 236792e1f97087df341ba5c3e95ffc244681b482 (patch) | |
| tree | 03f4109f6f6cbba0d353daa77ac6b907dfdb7c7b | |
| parent | c20ee77648b5e937f673f098ca438a945934a826 (diff) | |
feat: add Raku language support and move generation date to top
- Add Raku (Perl 6) language detection for .raku, .rakumod, .p6, .pm6 files
- Add Raku to code extractor and syntax highlighting (uses perl highlighting)
- Move 'Generated on' date to the top of the page below main header
- guprecords now correctly shows as 100% Raku
- ior now shows Raku at 5.4% of the codebase
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
| -rw-r--r-- | internal/showcase/code_extractor.go | 1 | ||||
| -rw-r--r-- | internal/showcase/language_detector.go | 7 | ||||
| -rw-r--r-- | internal/showcase/showcase.go | 6 |
3 files changed, 12 insertions, 2 deletions
diff --git a/internal/showcase/code_extractor.go b/internal/showcase/code_extractor.go index 98e1aca..4a4a429 100644 --- a/internal/showcase/code_extractor.go +++ b/internal/showcase/code_extractor.go @@ -41,6 +41,7 @@ func extractCodeSnippet(repoPath string, languages []LanguageStats) (string, str "Rust": {".rs"}, "Shell": {".sh", ".bash"}, "Perl": {".pl", ".pm"}, + "Raku": {".raku", ".rakumod", ".p6", ".pm6"}, "Haskell": {".hs"}, "Lua": {".lua"}, "HTML": {".html", ".htm"}, diff --git a/internal/showcase/language_detector.go b/internal/showcase/language_detector.go index cb9c591..b82430d 100644 --- a/internal/showcase/language_detector.go +++ b/internal/showcase/language_detector.go @@ -44,6 +44,13 @@ func detectLanguages(repoPath string) (languages []LanguageStats, documentation ".zsh": "Shell", ".fish": "Shell", ".pl": "Perl", + ".pm": "Perl", + ".raku": "Raku", + ".rakumod": "Raku", + ".rakudoc": "Raku", + ".rakutest": "Raku", + ".p6": "Raku", + ".pm6": "Raku", ".lua": "Lua", ".vim": "Vim Script", ".el": "Emacs Lisp", diff --git a/internal/showcase/showcase.go b/internal/showcase/showcase.go index dba6568..40d5d58 100644 --- a/internal/showcase/showcase.go +++ b/internal/showcase/showcase.go @@ -308,6 +308,9 @@ func (g *Generator) formatGemtext(summaries []ProjectSummary) string { // Header builder.WriteString("# Project Showcase\n\n") + // Generated date at the top + builder.WriteString(fmt.Sprintf("Generated on: %s\n\n", time.Now().Format("2006-01-02"))) + // Introduction paragraph builder.WriteString("This page showcases my open source projects, providing an overview of what each project does, its technical implementation, and key metrics. Each project summary includes information about the programming languages used, development activity, and licensing. The projects are ordered by recent activity, with the most actively maintained projects listed first.\n\n") @@ -403,8 +406,6 @@ func (g *Generator) formatGemtext(summaries []ProjectSummary) string { float64(aiAssistedCount)*100/float64(totalProjects), float64(nonAICount)*100/float64(totalProjects))) builder.WriteString("\n") - - builder.WriteString(fmt.Sprintf("Generated on: %s\n\n", time.Now().Format("2006-01-02"))) // Add Projects section builder.WriteString("## Projects\n\n") @@ -744,6 +745,7 @@ func extractLanguageForHighlighting(codeLanguage string) string { "shell": "sh", // source-highlight uses sh.lang "bash": "bash", "perl": "perl", + "raku": "perl", // Use perl highlighting for Raku "php": "php", "swift": "swift", "kotlin": "java", // Use java highlighting for Kotlin |
