publicbio

package module
v0.0.0-...-4abb1d8 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: AGPL-3.0 Imports: 14 Imported by: 0

README

Public.Bio

Create a simple public bio for yourself. An open source alternative to about.me, Linktree, Linkkle, etc.

a preview of public.bio

Features

  • Single-user mode
  • Run dynamically or generate a static site

Getting Started

Right now it's only made for a single user. Edit sample.json and then run:

go install ./cmd/publicbio
publicbio -u sample.json

You'll see your site at localhost:8080. Provide a different port with the -p option.

Generate a static site

Use publicbio as a static site generator instead of server application with the -s flag. HTML goes to stdout, so direct it to the file you want.

publicbio -u sample.json -s > bio.html

Development

After updating styles, run make.

Thanks

Thanks to International for the initial design, and thanks to Shane for the name!

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatVersion

func FormatVersion() string

FormatVersion constructs the version string for the application

func Serve

func Serve(cfg *Config)

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func (*App) InitRoutes

func (app *App) InitRoutes(router *mux.Router)

type Config

type Config struct {
	Host string
	Port int

	UserFile string
	// contains filtered or unexported fields
}
type Link struct {
	Title string `json:"title"`
	URL   string `json:"url"`
}

type Profile

type Profile struct {
	AvatarURL string                   `json:"avatar_url"`
	Username  string                   `json:"username"`
	Name      converter.NullJSONString `json:"name"`
	Header    converter.NullJSONString `json:"header"`
	Bio       converter.NullJSONString `json:"bio"`
	Links     []Link                   `json:"links"`
}

Profile is a publicly-viewable user, containing only the data necessary to display a profile.

func (*Profile) RenderedBio

func (p *Profile) RenderedBio() template.HTML

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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