Corporate website for ArtiVisi Intermedia built with Hugo and Tailwind CSS v4.
- Hugo: v0.152.2 - Static site generator
- Tailwind CSS: v4.1.17 - Utility-first CSS framework
- Node.js: Required for Tailwind CSS build process
- Hugo v0.152.2 or later
- Node.js and npm
- Git
- Clone the repository:
git clone git@github.com:artivisi/artivisi.github.io.git
cd artivisi.github.io- Install dependencies:
npm installRun Hugo server with live reload:
hugo serverThe site will be available at http://localhost:1313
If you're modifying Tailwind classes, run CSS watcher in a separate terminal:
npm run dev:cssThis watches for changes and rebuilds CSS automatically.
content/
├── products/ # Product pages
├── projects/ # Project case studies
├── training/ # Training sessions
├── about_us/ # About us pages
└── career/ # Career opportunities
static/
├── css/ # Compiled CSS (main.css ignored in git)
├── js/ # JavaScript (jQuery, Swiper, Magnify, main.js)
├── img/ # Images organized by section
│ ├── products/{product-name}/ # Product images
│ ├── projects/{project-name}/ # Project images
│ └── training/{training-name}/ # Training images
└── fonts/ # Geist and GeistMono fonts
diagrams/
├── render-thumbnails.js # Generic thumbnail generator
├── product-thumbnails/ # Product diagram sources
├── project-thumbnails/ # Project diagram sources
└── training-thumbnails/ # Training diagram sources
debug/
├── screenshots/ # Screenshot utilities
│ ├── screenshot-navbar.js # Navbar screenshot tool
│ └── screenshot-external-app.js # External app screenshot tool
├── components/ # Component testing scripts
├── css/ # CSS debugging tools
├── production/ # Production validation
└── archive/ # Deprecated scripts
- Create a new markdown file in
content/products/:
touch content/products/my-product.md- Add frontmatter and content:
---
title: "My Product Name"
description: "Brief product description"
icon: "/img/products/my-product/thumbnail.png"
weight: 5
---
## Product Description
Detailed product information here...
## Key Features
- Feature 1
- Feature 2
## Screenshots
- Add product images:
mkdir -p static/img/products/my-product
cp my-thumbnail.png static/img/products/my-product/thumbnail.pngIMPORTANT: Image filenames must be lowercase to ensure compatibility with Linux production servers. macOS is case-insensitive, but Linux is case-sensitive.
- Create markdown file in
content/projects/:
---
title: "Project Name"
description: "Project description"
client: "Client Name"
date: 2025-01-15
image: "/img/projects/project-name/thumbnail.png"
---
Project details...- Create markdown file in
content/training/:
---
title: "Training Name"
date: 2025-01-15
client: "Client Name"
description: "Training description"
image: "/img/training/training-name/thumbnail.png"
---
Training content...- Navigate to the content file (e.g.,
content/products/remittance.md) - Edit the markdown file
- Save changes
- Hugo will automatically reload if dev server is running
- Weight: Controls ordering in list pages (lower = appears first)
- Date: Used for sorting training and projects by date
- Images: Store in
static/img/{section}/{item-name}/
npm run buildThis runs:
npm run build:css- Compiles and minifies Tailwind CSShugo --gc --minify- Builds optimized static site
Output is in public/ directory.
If you only need to rebuild CSS:
npm run build:cssNote: static/css/main.css is ignored in git because GitHub Actions builds it automatically during deployment.
- Build the site:
npm run build- Serve the built site:
hugo server --source=public --bind 0.0.0.0 --port 1313Or use Hugo's built-in server:
hugo serverTo test exactly what will be deployed:
npm run build
cd public
python3 -m http.server 8000Visit http://localhost:8000
The debug/ folder contains Playwright-based testing and debugging utilities.
Production Validation:
cd debug
node production/check-production.jsChecks production site for broken images and rendering issues.
Component Testing:
# Test dropdown menu behavior
node debug/components/verify-dropdown.js
# Inspect navbar structure
node debug/components/inspect-navbar.jsCSS Debugging:
# Debug Tailwind CSS application
hugo server --noHTTPCache --port 1314
node debug/css/debug-css.jsScreenshot Tools:
# Screenshot local Hugo site
node debug/screenshots/screenshot-navbar.js
# Screenshot external applications
node debug/screenshots/screenshot-external-app.js atm-solution
node debug/screenshots/screenshot-external-app.js hsm-simulatorSee debug/README.md for complete documentation.
The site automatically deploys via GitHub Actions when you push to main:
- Commit your changes:
git add .
git commit -m "Your commit message"- Push to GitHub:
git push origin main- GitHub Actions will:
- Install dependencies
- Build CSS with Tailwind
- Build Hugo site
- Deploy to GitHub Pages
See .github/workflows/hugo.yaml for the deployment configuration.
The workflow runs on every push to main and:
- Installs Node.js dependencies
- Builds Tailwind CSS
- Builds Hugo site with
--gc --minify - Deploys to
gh-pagesbranch
Main config: hugo.toml
Key settings:
baseURL: Production URLpagination.pagerSize: Items per page (9)enableRobotsTXT: SEO configuration
Tailwind v4 uses CSS-based configuration in assets/css/tailwind.css:
- Custom theme configuration
- Dark mode settings
- Responsive breakpoints
- Rebuild CSS:
npm run build:css- Clear Hugo cache:
rm -rf resources/
hugo server --noHTTPCacheCheck filename case sensitivity:
- ✅
thumbnail.png(lowercase) - ❌
Thumbnail.png(uppercase)
Linux production servers are case-sensitive, unlike macOS.
Use the Playwright debug script:
cd debug
node check-production.jsThis will check all product images on the live site.
The diagrams/ folder contains Mermaid diagram sources and a generic thumbnail generator.
Prerequisites:
npm install -g @mermaid-js/mermaid-cliGenerate thumbnails for specific content type:
# Products only
node diagrams/render-thumbnails.js products
# Projects only
node diagrams/render-thumbnails.js projects
# Training only
node diagrams/render-thumbnails.js training
# All content types
node diagrams/render-thumbnails.js all- Create Mermaid file:
# For products
cat > diagrams/product-thumbnails/my-product.mmd <<'EOF'
graph TB
A[Frontend] --> B[Backend]
B --> C[Database]
EOF- Generate thumbnail:
node diagrams/render-thumbnails.js products- Reference in content:
---
title: "My Product"
icon: "/img/products/my-product/thumbnail.png"
---Features:
- Auto-detection of
.mmdfiles - 3x device scale for HiDPI displays
- Transparent background
- Outputs to
static/img/{type}/{name}/thumbnail.png
See diagrams/README.md for complete documentation and diagram styling guide.
The debug/screenshots/screenshot-external-app.js tool captures screenshots from external web applications for product documentation.
cd debug
npm install
npx playwright install chromiumUsing existing presets:
# ATM simulator (requires app running on localhost:7070)
node debug/screenshots/screenshot-external-app.js atm-solution
# HSM simulator (requires app running on localhost:8080)
node debug/screenshots/screenshot-external-app.js hsm-simulatorEdit debug/screenshots/screenshot-external-app.js and add to CONFIGS:
'my-app': {
baseUrl: 'http://localhost:3000',
outputDir: path.join(__dirname, '../../static/img/products/my-app'),
screenshots: [
{
url: '/dashboard',
filename: '01-dashboard.png',
description: 'Dashboard Overview',
fullPage: true
},
{
url: '/settings',
filename: '02-settings.png',
description: 'Settings Page',
fullPage: false
}
],
auth: { // Optional authentication
loginUrl: '/login',
username: 'admin',
password: 'password',
usernameSelector: 'input[name="username"]',
passwordSelector: 'input[name="password"]',
submitSelector: 'button[type="submit"]'
},
viewport: { width: 1920, height: 1080 }
}Features:
- Authentication support (username/password)
- Multi-page capture
- Full-page or viewport screenshots
- Configurable viewport sizes
- Auto-creates output directories
See debug/README.md for complete documentation.
npm updatenpm audit- Create content directory:
content/new-section/ - Create section index:
content/new-section/_index.md - Create layout:
layouts/new-section/list.html - Add navigation link in
layouts/partials/navbar.html
- Content files:
kebab-case.md - Image files:
lowercase-only.png(critical for Linux compatibility) - Directories:
lowercase_with_underscoresorkebab-case
For detailed documentation on specific components:
- Debug Tools: See
debug/README.mdfor complete Playwright testing and debugging documentation - Diagram Generation: See
diagrams/README.mdfor Mermaid diagram creation and thumbnail generation - Project Guidelines: See
CLAUDE.mdfor development guidelines and architecture details
ISC
For issues or questions, contact the development team.