render

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Placeholder = "<!-- gh-starlist-export -->"

Placeholder is the marker a template file uses to mark where to generate,

Variables

This section is empty.

Functions

func ApplyTemplate

func ApplyTemplate(template, body string) string

ApplyTemplate substitutes body into the template, or returns body as is when the template holds no placeholder.

func Markdown

func Markdown(sections []Section) string

Markdown renders the sections as a table of contents followed by one table per section.

func NewTable

func NewTable() tableprinter.TablePrinter

NewTable builds a table printer that renders columns on a terminal and tab separated values when the output is piped.

func Slugify

func Slugify(text string) string

Slugify turns a heading into the anchor GitHub generates for it.

Types

type Section

type Section struct {
	Name  string          `json:"name"`
	Repos []starlist.Repo `json:"repos"`
}

Section is one rendered heading with the repositories under it.

Jump to

Keyboard shortcuts

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