feat: implement dynamic date calculation for projects

- Remove hardcoded startDate from La Porra project
- Add gitRepoUrl field to Project struct for dynamic date fetching
- Implement backend logic to fetch first commit date from git repositories
- Add processProjectDates function to calculate dates dynamically
- Update template to display computed dates and dynamic "Present/Presente"
- Add support for both static and git-based project start dates

When a project has a gitRepoUrl, the system automatically fetches the first
commit date from the repository. For current projects, it displays
"Present" (English) or "Presente" (Spanish) dynamically from the backend.

The La Porra project now uses git repository path for date calculation
instead of hardcoded JSON values.
This commit is contained in:
juanatsap
2025-11-09 02:43:40 +00:00
parent a6783da1f6
commit e572af0771
7 changed files with 267 additions and 97 deletions
+7 -2
View File
@@ -102,14 +102,19 @@ type Language struct {
type Project struct {
Title string `json:"title"`
URL string `json:"url"`
ProjectLogo string `json:"projectLogo,omitempty"` // Optional logo filename
ProjectLogo string `json:"projectLogo,omitempty"` // Optional logo filename
GitRepoUrl string `json:"gitRepoUrl,omitempty"` // Optional git repository URL for dynamic dates
Location string `json:"location"`
StartDate string `json:"startDate"`
StartDate string `json:"startDate,omitempty"` // Optional static start date
Current bool `json:"current"`
MaintainedBy string `json:"maintainedBy,omitempty"` // Optional maintainer name (e.g., "SAP")
Technologies []string `json:"technologies"`
ShortDescription string `json:"shortDescription"`
Responsibilities []string `json:"responsibilities"`
// Computed fields (not stored in JSON)
ComputedStartDate string `json:"-"` // Dynamically calculated from git repo or system
DynamicDate string `json:"-"` // Current date for ongoing projects
}
type Award struct {