Skip to content

Development

Overview

Bagian ini menjelaskan workflow pengembangan source dan content Personal Site. Hugo digunakan hanya pada development dan CI; NGINX runtime hanya menerima hasil static build.

Repository Responsibilities

personal-site/
β”œβ”€β”€ content/                 Hugo content
β”œβ”€β”€ layouts/                 template override
β”œβ”€β”€ static/                  static assets
β”œβ”€β”€ themes/                  Hugo theme submodule
β”œβ”€β”€ hugo.toml                Hugo configuration
β”œβ”€β”€ Jenkinsfile              CI pipeline
β”œβ”€β”€ Jenkinsfile.cd           CD pipeline
└── deployment/
    β”œβ”€β”€ CONFIG               shared non-secret configuration
    └── deploy.sh            application runtime launcher

Development Workflow

Create or update content
        ↓
Run local Hugo server
        ↓
Review page and assets
        ↓
Commit and push to Gitea
        ↓
Jenkins CI builds immutable artifact

Local Development

  1. Clone repository and initialize submodules.

    git clone <personal-site-repository-url>
    cd personal-site
    git submodule update --init --recursive
    
  2. Run Hugo development server.

    hugo server --buildDrafts
    
  3. Open the local URL displayed by Hugo and review the changes.

  4. Validate a production-style build.

    hugo --minify
    test -s public/index.html
    

The generated public/ directory is build output and should not become the source of truth. CI generates a clean build for every release candidate.

Content Development

  • Store publishable pages and articles under content/.
  • Keep filenames and front matter consistent with the Hugo content model.
  • Store files that must be copied directly under static/.
  • Use layout overrides only when theme configuration is insufficient.
  • Review internal links, images, metadata, and responsive rendering before push.

Source Control Workflow

  • Keep source, content, pipeline definitions, and deployment configuration in the same repository so a change can be traced to a commit.
  • Do not store MinIO passwords or other secrets in the repository.
  • Commit the Hugo theme reference when the submodule revision changes.
  • Use CI outputβ€”not a manually generated archiveβ€”as the deployment artifact.