Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NoteStore = DirToStructRes{}
来自 main.go 的生成
Functions ¶
func FilePathToWebPath ¶
FilePathToWebPath 将相对文件路径转为 web路径,主要是去除文件中的id 以及添加 .html
Types ¶
type BlockRefInfo ¶
BlockRefInfo 块引用所需信息
type DirToStructRes ¶
type DirToStructRes struct { StructList []FileEntity FindFileEntityFromID FindFileEntityFromID }
DirToStructRes DirToStruct 的返回值定义
type EmbeddedBlockInfo ¶
type EmbeddedBlockInfo struct { AEmbeddedBlockInfo int Title interface{} Src string Content interface{} }
EmbeddedBlockInfo 嵌入块所需信息
type FileEntity ¶
type FileEntity struct { // 文档名 title Name string // 文件绝对路径 Path string // 相对源目录的路径 RelativePath string NotesCode string Info os.FileInfo StructInfoList []StructInfo Tree *parse.Tree Output func() (html string, xml string) }
FileEntity md 文件被解析后的结构
func (*FileEntity) FileEntityRelativePath ¶
func (r *FileEntity) FileEntityRelativePath(target FileEntity, id string) string
func (*FileEntity) VirtualPath ¶
func (r *FileEntity) VirtualPath() (path string)
VirtualPath 是最终要在浏览器中可以访问的路径
type FindFileEntityFromID ¶
type FindFileEntityFromID func(id string) (FileEntity, StructInfo, error)
FindFileEntityFromID 通过 id 返回对应实体
type RedirectInfo ¶ added in v0.5.2
RedirectInfo 重定向模板所需信息
type StructInfo ¶
type StructInfo struct { BlockID string BlockType string Node *ast.Node FileEntity *FileEntity }
StructInfo md 结构信息
func (*StructInfo) GetCreated ¶
func (r *StructInfo) GetCreated() time.Time
func (*StructInfo) GetUpdate ¶
func (r *StructInfo) GetUpdate() time.Time
Click to show internal directories.
Click to hide internal directories.