Documentation
¶
Index ¶
- func HasFrontmatter(markdown string) bool
- func RemoveFrontmatter(markdown string) string
- type ParseResult
- type Parser
- func (p *Parser) ExtractFrontmatterOnly(markdown string) (string, bool)
- func (p *Parser) GetNotionPageID(fm map[string]interface{}) string
- func (p *Parser) GetTitle(fm map[string]interface{}) string
- func (p *Parser) Parse(markdown string) (*ParseResult, error)
- func (p *Parser) ParseFile(r io.Reader) (*ParseResult, error)
- type Updater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasFrontmatter ¶
HasFrontmatter frontmatterが存在するかチェック
func RemoveFrontmatter ¶
RemoveFrontmatter frontmatterを削除したコンテンツを取得
Types ¶
type ParseResult ¶
type ParseResult struct {
Frontmatter map[string]interface{} // frontmatterの内容
Content string // frontmatter以降のMarkdownコンテンツ
StartPos int // frontmatterの開始位置
EndPos int // frontmatterの終了位置
}
ParseResult パース結果
type Parser ¶
type Parser struct{}
Parser frontmatterパーサー
func (*Parser) ExtractFrontmatterOnly ¶
ExtractFrontmatterOnly frontmatterのみを文字列として抽出
func (*Parser) GetNotionPageID ¶
GetNotionPageID frontmatterからNotionページIDを取得
type Updater ¶
type Updater struct{}
Updater frontmatter更新器
func (*Updater) UpdateMultipleFields ¶
UpdateMultipleFields 複数のフィールドを一度に更新
func (*Updater) UpdateNotionPageID ¶
UpdateNotionPageID ファイルのfrontmatterにNotionページIDを書き込む
Click to show internal directories.
Click to hide internal directories.