diff options
| author | 2025-08-01 16:52:52 +0700 | |
|---|---|---|
| committer | 2025-08-01 16:52:52 +0700 | |
| commit | 0c0900cdea12364a25ebf9bb8205a795416e8d6d (patch) | |
| tree | 7052b25fb404afbfe51c27cdaceca5452c697cb0 /internal/lightgallery/block.go | |
| parent | a1f511368b898ba53ca685dd3f41f2901f295fd3 (diff) | |
| download | web-0c0900cdea12364a25ebf9bb8205a795416e8d6d.tar.gz web-0c0900cdea12364a25ebf9bb8205a795416e8d6d.zip | |
feat: support of multi-page blog via b2
feat: use markdown + frontmatter for page content
feat: add main page with dynamic page lookup
feat: add night theme
feat: extract timestamp of photo taken from picture name
Diffstat (limited to 'internal/lightgallery/block.go')
| -rw-r--r-- | internal/lightgallery/block.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/internal/lightgallery/block.go b/internal/lightgallery/block.go new file mode 100644 index 0000000..dade2ea --- /dev/null +++ b/internal/lightgallery/block.go @@ -0,0 +1,26 @@ +package lightgallery + +import "github.com/yuin/goldmark/ast" + +// LightGalleryBlock represents a light gallery block in the AST +type LightGalleryBlock struct { + ast.BaseBlock + Images []LightGalleryImage +} + +type LightGalleryImage struct { + URL string + Caption string +} + +var KindLightGalleryBlock = ast.NewNodeKind("LightGalleryBlock") + +// Dump implements ast.Node.Dump +func (n *LightGalleryBlock) Dump(source []byte, level int) { + ast.DumpHelper(n, source, level, nil, nil) +} + +// Kind implements ast.Node.Kind +func (n *LightGalleryBlock) Kind() ast.NodeKind { + return KindLightGalleryBlock +} |