Skip to content

Commit ca54f96

Browse files
committed
feat: ruby project page version
1 parent 94cb9bc commit ca54f96

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

public/projects/gobake/hero.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# gobake
22
A Go-native build orchestrator, type-safe and dependency-free.
3+
(version) 0.2.2
34

45
**gobake** is a Go-native build orchestrator. It replaces Makefiles and shell scripts with a single, type-safe `Recipe.go` file. Inspired by `nob.h`, it allows you to write your build logic in Go, which is then compiled and executed on the fly.

src/pages/project-pages/RubyProjectPage.jsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ const RubyProjectPage = () => {
3131
repo_link: '',
3232
shortDescription: '',
3333
image: '',
34-
technologies: []
34+
technologies: [],
35+
version: '0.1.0'
3536
});
3637
const [loading, setLoading] = useState(true);
3738
const [copied, setCopied] = useState(false);
@@ -66,6 +67,10 @@ const RubyProjectPage = () => {
6667
const title = heroLines[0]?.replace('#', '').trim() || productSlug;
6768
const tagline = heroLines[1]?.trim() || '';
6869

70+
// Extract version from hero.txt if available (PIML style)
71+
const versionMatch = hero.match(/\(version\)\s*([^\n\r]+)/);
72+
const version = versionMatch ? versionMatch[1].trim() : '0.1.0';
73+
6974
// Extract repo link from terminal.txt if available
7075
const repoMatch = terminal.match(/btnLink:\s*(https:\/\/github\.com\/[^\s\n]+)/);
7176
const repo_link = repoMatch ? repoMatch[1] : '';
@@ -76,7 +81,8 @@ const RubyProjectPage = () => {
7681
repo_link,
7782
shortDescription: tagline,
7883
image: `/images/projects/${productSlug}/${productSlug}-banner.png`,
79-
technologies: ['Go', 'Build Tool']
84+
technologies: ['Go', 'Build Tool'],
85+
version
8086
});
8187
} catch (error) {
8288
console.error('Error fetching project content:', error);
@@ -207,7 +213,7 @@ const RubyProjectPage = () => {
207213
<p className="text-base md:text-xl tracking-wide text-[#E2D1AA] whitespace-nowrap uppercase">
208214
<span className="font-light text-white/70 tracking-normal">Latest Version:</span>{' '}
209215
<span className="font-extrabold text-white relative inline-block">
210-
0.2.0
216+
{metadata.version}
211217
<img src={`/projects/${productSlug}/version-line.svg`} alt="" className="absolute -bottom-[4px] md:-bottom-[6px] left-0 w-full h-auto opacity-50" />
212218
</span>
213219
</p>

0 commit comments

Comments
 (0)