Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 { Name string // 文件绝对路径 Path string // 相对源目录的路径 RelativePath string // 最终要在浏览器中可以访问的路径 VirtualPath 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
type FindFileEntityFromID ¶
type FindFileEntityFromID func(id string) (FileEntity, StructInfo, error)
FindFileEntityFromID 通过 id 返回对应实体
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.