cmd

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClearCacheCmd = &cobra.Command{
	Use:   "clear-cache",
	Short: "Clear local cache",
	Run: func(cmd *cobra.Command, args []string) {
		cache.Shared().Clear()
	},
}
View Source
var CreateCmd = func() *cobra.Command {
	cmd := &cobra.Command{
		Use:   "create [directory]",
		Short: "Create a new site",
		Run:   create,
	}

	return cmd
}()
View Source
var ExportCmd = func() *cobra.Command {
	var outputPath string
	var minimize bool

	fn := func(cmd *cobra.Command, args []string) {
		export.Export(outputPath, minimize)
	}

	cmd := &cobra.Command{
		Use:   "export",
		Short: "Export sites",
		Run:   fn,
	}
	cmd.Flags().StringVarP(&outputPath, "output", "o", "dist", "Output directory")
	cmd.Flags().BoolVarP(&minimize, "minimize", "m", false, "Wether minimize output files(css, html, js supported) or not")

	return cmd
}()
View Source
var PreviewCmd = func() *cobra.Command {
	cmd := &cobra.Command{
		Use:   "preview",
		Short: "Preview in local environment",
		Run:   preview,
	}
	cmd.Flags().IntVarP(&port, "port", "p", 5000, "Port")

	return cmd
}()
View Source
var Revision = ""
View Source
var Version = ""
View Source
var VersionCmd = &cobra.Command{
	Use:   "version",
	Short: "Print the version",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Printf("foto v%s+%s\n", Version, Revision)
	},
}

Functions

func Execute

func Execute()

Types

This section is empty.

Jump to

Keyboard shortcuts

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