templates

package
v0.11.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2026 License: BSD-3-Clause Imports: 7 Imported by: 0

README

{{- if .Logo.URL }} {{- end }}

{{ .Definition.Project.Title }}

{{ .Definition.Project.Description }}

{{- if .DomainLinks }}

{{ .DomainLinks }}

{{- end }}

![WebKit](https://img.shields.io/badge/webkit-{{ .Definition.WebkitVersion }}-blue) [![Backup](https://github.com/{{ .Definition.Project.Repo.Owner }}/{{ .Definition.Project.Repo.Name }}/actions/workflows/backup.yaml/badge.svg)](https://github.com/{{ .Definition.Project.Repo.Owner }}/{{ .Definition.Project.Repo.Name }}/actions/workflows/backup.yaml) [![Release](https://github.com/{{ .Definition.Project.Repo.Owner }}/{{ .Definition.Project.Repo.Name }}/actions/workflows/release.yaml/badge.svg)](https://github.com/{{ .Definition.Project.Repo.Owner }}/{{ .Definition.Project.Repo.Name }}/actions/workflows/release.yaml) ainsley.dev Twitter Handle

{{ .Definition.Project.Title }}

{{ if .Content -}} {{ .Content }} {{- end }}

{{ .Definition.Project.Description }}

Built with WebKit {{ .Definition.WebkitVersion }}.

This repository contains {{ len .Definition.Apps }} application{{ if ne (len .Definition.Apps) 1 }}s{{ end }}{{ if .Definition.Resources }} and {{ len .Definition.Resources }} resource{{ if ne (len .Definition.Resources) 1 }}s{{ end }}{{ end }}.

{{- if .MonitorBadges }}

Status

Uptime monitors for the application. Visit the [status page]({{ .StatusPageURL }}) for more details. {{- if .DashboardURL }}

View all monitors on the [dashboard]({{ .DashboardURL }}). {{- end }}

Monitor Status
{{- range .MonitorBadges }}
{{ .Name }} [![Status]({{ .BadgeURL }})]({{ $.StatusPageURL }})
{{- end }}
{{- end }}

Apps

{{- range .Definition.Apps }}

{{ .Title }}

{{ if eq .Type "payload" }} {{- else if eq .Type "svelte-kit" }} {{- end }}

Type: {{ .Type }}{{ if .Build.Port }} | Port: {{ .Build.Port }}{{ end }}{{ if .PrimaryDomain }} | Domain: {{ .PrimaryDomain }}{{ end }}

{{ .Description }}

{{- if .OrderedCommands }}

Commands:

Command Script CI/CD
{{- range .OrderedCommands }}
{{ .Name }} {{ .Cmd }} {{ if .SkipCI }}No{{ else }}Yes{{ end }}
{{- end }}
{{- end }}

{{- $tools := .InstallCommands }} {{- if $tools }}

Tools: {{- range $tools }}

  • {{ . }} {{- end }} {{- end }}

{{- if .Infra.Provider }}

Infrastructure:

  • Provider: {{ .Infra.Provider }}
  • Type: {{ .Infra.Type }} {{- range $key, $value := .Infra.Config }}
  • {{ prettyConfigKey $key }}: {{ $value }} {{- end }} {{- end }} {{- end }}

{{- if .Definition.Resources }}

Resources

{{- range .Definition.Resources }}

{{ .Title }}

{{ if eq .Type "postgres" }} {{- else if eq .Type "s3" }} DigitalOcean Spaces {{- else if eq .Type "sqlite" }} {{- end }}

Type: {{ .Type }} | Provider: {{ .Provider }} | Backups: {{ if .Backup.Enabled }}Enabled{{ else }}Disabled{{ end }} {{- if .Description }}

{{ .Description }} {{- end }}

Configuration:

Setting Value
{{- range $key, $value := .Config }}
{{ prettyConfigKey $key }} {{ $value }}
{{- end }}

Available Outputs: {{- range .Type.Documentation }}

  • {{ .Name }} - {{ .Description }} {{- end }} {{- end }} {{- end }}

Development

Prerequisites

{{- if .Definition.ContainsGo }}

  • Go (latest) {{- end }} {{- if .Definition.ContainsJS }}
  • Node.js and pnpm {{- end }}
  • Docker and Docker Compose
  • WebKit CLI

Getting Started

  1. Clone the repository:

    git clone https://github.com/{{ .Definition.Project.Repo.Owner }}/{{ .Definition.Project.Repo.Name }}.git
    cd {{ .Definition.Project.Repo.Name }}
    
  2. Install dependencies:

    pnpm install
    
  3. Start development:

    pnpm dev
    
  4. Access applications: {{- range .Definition.Apps }} {{- if gt .Build.Port 0 }}

    • {{ .Title }}: http://localhost:{{ .Build.Port }} {{- end }} {{- end }}

Deployment

Deployment is managed by WebKit using:

  • Infrastructure: Terraform
  • CI/CD: GitHub Actions
  • Environments: Development, Production

{{- if .ProviderGroups }}

Hosting Providers: {{- range $provider, $items := .ProviderGroups }}

  • {{ $provider }}: {{ $items }} {{- end }} {{- end }}

License

Code Copyright {{ .CurrentYear }} {{ .Definition.Project.Repo.Owner }}. Code released under the BSD-3 Clause.


Built with WebKit

Documentation

Overview

Package templates provides embedded Go templates for code generation.

It includes template loading utilities with Sprig functions and custom GitHub Actions helpers for generating workflows, configuration files, and other templated content.

Index

Constants

This section is empty.

Variables

View Source
var Embed embed.FS

Functions

func LoadTemplate

func LoadTemplate(name string) (*template.Template, error)

LoadTemplate returns a parsed template from the embedded FS.

func MustLoadTemplate

func MustLoadTemplate(name string) *template.Template

MustLoadTemplate calls LoadTemplate but panics if parsing fails.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL