odin

package
v0.0.0-...-64699cf Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2021 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigYaml = `site:
    author:
    domain:
    language:
    github:
`
View Source
const Css = `` /* 4696-byte string literal not displayed */
View Source
const IndexEn = `` /* 1852-byte string literal not displayed */
View Source
const IndexFa = `` /* 1921-byte string literal not displayed */
View Source
const Js = `` /* 46611-byte string literal not displayed */
View Source
const PostEn = `` /* 1847-byte string literal not displayed */
View Source
const PostFa = `` /* 1829-byte string literal not displayed */

Variables

This section is empty.

Functions

func Build

func Build()

Build is entry function for 'odin build' command

func Config

func Config()

func CopyFile

func CopyFile(src, dst string)

func GetCurrentDir

func GetCurrentDir() string

func Init

func Init()

func New

func New(title string)

func Push

func Push()

func SortBlogPostByYear

func SortBlogPostByYear(posts []Post) []map[string][]Post

SortBlogPostByYear sort blog posts

Types

type IndexPage

type IndexPage struct {
	Title    string              // title of owner of blog ( like : soroush safari )
	BlogPost []map[string][]Post // all posts
}

IndexPage : we use this struct to ship data into index.html

type OdinConfig

type OdinConfig struct {
	Site struct {
		Author   string `yaml:"author"`
		Domain   string `yaml:"domain"`
		Language string `yaml:"language"`
		Github   string `yaml:"github"`
	} `yaml:"site"`
}

func ReadConfig

func ReadConfig() OdinConfig

ReadConfig read config.yaml

type Post

type Post struct {
	Date      string
	Slug      string // like : month / day ( 01/26 ) . used in index.html page for list all blog posts
	Title     string // post title
	Permalink string // link of post
	Source    []byte // content of markdown file
}

Post : this struct will contain blog post

Jump to

Keyboard shortcuts

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