Documentation
¶
Index ¶
- func Generate404HTML(stagingPath string) error
- func GenerateInstallScript(opts InstallScriptOptions) (string, error)
- func GenerateKeyringName(baseURL string) string
- type Apt
- type AptComposeOptions
- type ComposeOptions
- type DirectoryEntry
- type DirectoryListingData
- type FeedDetail
- type FeedInfo
- type IndexData
- type InstallScriptOptions
- type PackageTableConfig
- type PreparedPackageTable
- type RepositoryInfo
- type RepositoryLink
- type RepositoryPageData
- type TableCell
- type TableHeaderColumn
- type TableRow
- type TailwindCLI
- type Web
- type WebComposeOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate404HTML ¶
Generate404HTML creates a minimal 404.html file at the root of the staging directory. This prevents Cloudflare Pages from treating the site as a Single Page Application, which would interfere with _redirects functionality.
func GenerateInstallScript ¶
func GenerateInstallScript(opts InstallScriptOptions) (string, error)
GenerateInstallScript generates a bash script for installing the repository
func GenerateKeyringName ¶
GenerateKeyringName creates a keyring filename from base URL Format: <sanitized-domain>
Types ¶
type Apt ¶
type Apt struct {
// contains filtered or unexported fields
}
Apt composes Debian repository structure from trusted files
type AptComposeOptions ¶
type AptComposeOptions struct {
ComposeOptions
// Repository contains the repository configuration
Repository *common.RepositoryOptions
// Trusted is the path to the trusted directory containing verified packages
Trusted string
// PoolMode is the pool organization mode: "hierarchical" or "redirect"
PoolMode string
}
AptComposeOptions contains configuration for APT repository composition
type ComposeOptions ¶
type ComposeOptions struct {
// Target is the path to the output directory
Target string
// Name is the repository name
Name string
// Feeds contains feed information
Feeds []*feed.FeedOptions
}
ComposeOptions contains common configuration shared by all composers
type DirectoryEntry ¶
DirectoryEntry represents a file or directory in the listing
type DirectoryListingData ¶
type DirectoryListingData struct {
CurrentPath string
ParentPath string
Entries []DirectoryEntry
AssetsPath string
PageTitle string
}
DirectoryListingData contains data for a directory browsing page
type FeedDetail ¶ added in v0.0.7
type FeedDetail struct {
Text string // Detail text to display
Hover string // Optional tooltip text (empty if no tooltip)
Warning bool // Whether to show a warning icon
}
FeedInfo contains information about a feed for template rendering
type FeedInfo ¶
type FeedInfo struct {
Type feed.FeedType // Feed type (GitHub, APT, OBS)
Name string // Feed name
Subtitle string // Subtitle
URL string // URL to the feed source
Icon string // Icon filename without extension
Details []FeedDetail // Formatted details to display (distributions, filters, etc.)
NoChanges bool // Whether this feed uses no_changes mode (no signature verification)
}
type IndexData ¶
type IndexData struct {
Repositories []RepositoryLink
AssetsPath string // Relative path to assets directory
PageTitle string // Title for the navigation bar
}
IndexData contains data for the root index page
type InstallScriptOptions ¶
type InstallScriptOptions struct {
RepoName string // Repository name
BaseURL string // Base URL for the repository
Distributions []string // Available distributions
KeyringName string // Keyring filename (sanitized domain)
}
InstallScriptOptions contains options for generating an install script
type PackageTableConfig ¶
type PackageTableConfig struct {
ID string // HTML element ID
Distributions []string // List of distributions to display
ArchitectureMode string // "multi" for multiple architectures, "source" for source only
Component string // Component name
}
PackageTableConfig defines the configuration for rendering a package table
type PreparedPackageTable ¶
type PreparedPackageTable struct {
ID string
DistHeaders []TableHeaderColumn // First header row (distributions)
ArchHeaders []TableHeaderColumn // Second header row (architectures), empty for source mode
Rows []TableRow
HasArchRow bool // Whether to show the architecture row
IsEmpty bool // Whether the table has no packages
EmptyMessage string // Message to show when empty
}
PreparedPackageTable contains all the pre-computed data for rendering a table
type RepositoryInfo ¶
RepositoryInfo contains information about a repository for template rendering
type RepositoryLink ¶
RepositoryLink contains minimal info for linking to a repository
type RepositoryPageData ¶
type RepositoryPageData struct {
ComposeOptions *ComposeOptions
RepositoryOptions *common.RepositoryOptions
DescriptionHTML template.HTML // Rendered markdown description
BaseURL string // Base URL for the repository
Repository *debext.Repository
AssetsPath string // Relative path to assets directory
Tables []PreparedPackageTable // Pre-computed package tables
Feeds []FeedInfo // Feed display info with icons
PageTitle string // Title for the navigation bar
KeyringName string // Keyring filename (sanitized domain)
RepositoryIcon string // Repository icon filename (without extension) or empty for letter box
}
RepositoryPageData contains data for a repository detail page
type TableCell ¶
type TableCell struct {
Version string // Full version string
ShortVersion string // Version without distribution suffix
IsNewest bool // Whether this is the newest version
HasPackage bool // Whether a package exists for this cell
}
TableCell represents a single cell in the table body
type TableHeaderColumn ¶
type TableHeaderColumn struct {
Name string // Display name (distribution or architecture)
Colspan int // Number of columns this header spans (for distribution headers)
}
TableHeaderColumn represents a column in the table header
type TailwindCLI ¶
type TailwindCLI struct {
// contains filtered or unexported fields
}
TailwindCLI manages the Tailwind CSS CLI binary
func NewTailwindCLI ¶
func NewTailwindCLI(downloader *common.Downloader, githubClient *github.Client, assetsDir string, release string) *TailwindCLI
NewTailwindCLI creates a new Tailwind CLI manager Downloads and caches the Tailwind binary in the assets directory If release is empty, uses the latest release
type Web ¶
type Web struct {
// contains filtered or unexported fields
}
Web generates static HTML pages for repository browsing
func NewWeb ¶
func NewWeb(options *WebComposeOptions, downloader *common.Downloader) (*Web, error)
NewWeb creates a new web composer
func (*Web) BuildTailwindCSS ¶
BuildTailwindCSS builds optimized CSS from templates using Tailwind CLI This should be called after all HTML files have been generated
func (*Web) GenerateDirectoryIndexes ¶
GenerateDirectoryIndexes creates browsable index.html files for dists/ and subdirectories
type WebComposeOptions ¶
type WebComposeOptions struct {
ComposeOptions
// Description is a markdown-formatted description of the repository
Description string
// Repository contains the repository configuration
Repository *common.RepositoryOptions
// BaseURL is the base URL where the repository will be served
BaseURL string
// Downloads is the root downloads directory for caching assets
Downloads string
// PrimaryPackage is the primary package name used for distribution sorting
PrimaryPackage string
// IconURLs maps feed type names to their icon SVG URLs
IconURLs map[string]string
// GitHubClient is the GitHub API client for fetching releases
GitHubClient *github.Client
// TailwindRelease is the specific Tailwind CSS release to use (empty = latest)
TailwindRelease string
// RepositoryConfig is the original repository configuration (used for YAML export)
RepositoryConfig any
}
WebComposeOptions contains configuration for web page generation