fix(hexojs): Use url_for() for all internal links in theme

Templates now properly use Hexo's url_for() helper:
- apps.ejs: navigation links
- category.ejs: breadcrumb, apps, services, blog links
- showcase.ejs: contact, portfolio, apps, services links

This ensures all links work correctly when root is set to a
subdirectory (e.g., /blog/ instead of /)

Bumped release to r5

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2026-01-24 14:40:45 +01:00
parent 21105f1ef1
commit a91bd48c3a
4 changed files with 20 additions and 20 deletions

View File

@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=secubox-app-hexojs
PKG_VERSION:=1.0.0
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_ARCH:=all
PKG_MAINTAINER:=CyberMind Studio <contact@cybermind.fr>

View File

@ -155,8 +155,8 @@ allApps.sort(function(a, b) {
<% } %>
<div class="apps-nav">
<a href="/" class="btn btn-secondary">← Accueil</a>
<a href="/categories/" class="btn btn-secondary">Catégories</a>
<a href="<%= url_for('/') %>" class="btn btn-secondary">← Accueil</a>
<a href="<%= url_for('categories/') %>" class="btn btn-secondary">Catégories</a>
</div>
</section>

View File

@ -68,7 +68,7 @@ if (typeof get_blog_categories === 'function') {
<% if (catDesc) { %><p class="cat-desc"><%= catDesc %></p><% } %>
<p class="cat-count"><%= postCount %> article<%= postCount > 1 ? 's' : '' %></p>
<nav class="breadcrumb">
<a href="/">Accueil</a> / <a href="/blog/">Blog</a> / <span><%= catName %></span>
<a href="<%= url_for('/') %>">Accueil</a> / <a href="<%= url_for('blog/') %>">Blog</a> / <span><%= catName %></span>
</nav>
</header>
@ -78,7 +78,7 @@ if (typeof get_blog_categories === 'function') {
<div class="res-group">
<h3>🚀 Apps</h3>
<% page.featured_apps.forEach(function(app) { %>
<a href="/apps/<%= app %>/" class="res-link"><%= app %></a>
<a href="<%= url_for('apps/' + app + '/') %>" class="res-link"><%= app %></a>
<% }); %>
</div>
<% } %>
@ -86,7 +86,7 @@ if (typeof get_blog_categories === 'function') {
<div class="res-group">
<h3>🛡️ Services</h3>
<% page.featured_services.forEach(function(svc) { %>
<a href="/services/<%= svc %>/" class="res-link"><%= svc %></a>
<a href="<%= url_for('services/' + svc + '/') %>" class="res-link"><%= svc %></a>
<% }); %>
</div>
<% } %>
@ -127,7 +127,7 @@ if (typeof get_blog_categories === 'function') {
<% } else { %>
<div class="no-posts">
<p>🚧 Aucun article dans cette catégorie pour le moment.</p>
<p><a href="/blog/">← Retour au blog</a></p>
<p><a href="<%= url_for('blog/') %>">← Retour au blog</a></p>
</div>
<% } %>
</section>

View File

@ -90,7 +90,7 @@ var opensource = portfolio.filter(function(p) { return p.type === 'opensource';
<div class="hero-cta">
<a href="#sites-clients" class="btn btn-primary">🏢 Sites Clients</a>
<a href="#applications" class="btn btn-secondary">📱 Applications</a>
<a href="/contact/" class="btn btn-secondary">💬 Contact</a>
<a href="<%= url_for('contact/') %>" class="btn btn-secondary">💬 Contact</a>
</div>
</div>
</section>
@ -159,7 +159,7 @@ var opensource = portfolio.filter(function(p) { return p.type === 'opensource';
</div>
<div class="section-footer">
<a href="/portfolio/clients/" class="btn btn-secondary">Voir tous les sites clients →</a>
<a href="<%= url_for('portfolio/clients/') %>" class="btn btn-secondary">Voir tous les sites clients →</a>
</div>
</section>
@ -225,10 +225,10 @@ var opensource = portfolio.filter(function(p) { return p.type === 'opensource';
</div>
<div class="section-footer">
<a href="/portfolio/projects/" class="btn btn-secondary">Tous les projets →</a>
<a href="<%= url_for('portfolio/projects/') %>" class="btn btn-secondary">Tous les projets →</a>
</div>
</section>
<!-- Section Applications -->
<section id="applications" class="showcase-section">
<div class="section-header">
@ -262,10 +262,10 @@ var opensource = portfolio.filter(function(p) { return p.type === 'opensource';
</div>
<div class="section-footer">
<a href="/apps/" class="btn btn-secondary">Toutes les applications →</a>
<a href="<%= url_for('apps/') %>" class="btn btn-secondary">Toutes les applications →</a>
</div>
</section>
<!-- Section Open Source -->
<section id="opensource" class="showcase-section alt-bg">
<div class="section-header">
@ -314,30 +314,30 @@ var opensource = portfolio.filter(function(p) { return p.type === 'opensource';
</div>
<div class="services-showcase-grid">
<a href="/services/pentest/" class="service-showcase-card">
<a href="<%= url_for('services/pentest/') %>" class="service-showcase-card">
<span class="service-icon">🛡️</span>
<h3>Pentest & Sécurité</h3>
<p>Audits, tests d'intrusion</p>
</a>
<a href="/services/dev/" class="service-showcase-card">
<a href="<%= url_for('services/dev/') %>" class="service-showcase-card">
<span class="service-icon">⚙️</span>
<h3>Développement</h3>
<p>Embarqué, Linux, IoT</p>
</a>
<a href="/services/formation/" class="service-showcase-card">
<a href="<%= url_for('services/formation/') %>" class="service-showcase-card">
<span class="service-icon">🎓</span>
<h3>Formation</h3>
<p>Cybersécurité, Creative Thinking</p>
</a>
<a href="/services/gk2net/" class="service-showcase-card">
<a href="<%= url_for('services/gk2net/') %>" class="service-showcase-card">
<span class="service-icon">🌐</span>
<h3>Création Web</h3>
<p>Sites & Hébergement</p>
</a>
</div>
<div class="section-footer">
<a href="/services/" class="btn btn-primary">Découvrir tous les services →</a>
<a href="<%= url_for('services/') %>" class="btn btn-primary">Découvrir tous les services →</a>
</div>
</section>
@ -347,7 +347,7 @@ var opensource = portfolio.filter(function(p) { return p.type === 'opensource';
<h2>💬 Un projet en tête ?</h2>
<p>Discutons de vos besoins et trouvons la meilleure solution ensemble.</p>
<div class="cta-buttons">
<a href="/contact/" class="btn btn-primary btn-large">Demander un devis</a>
<a href="<%= url_for('contact/') %>" class="btn btn-primary btn-large">Demander un devis</a>
<a href="mailto:contact@cybermind.fr" class="btn btn-secondary btn-large">📧 contact@cybermind.fr</a>
</div>
</div>