feat(blogo,markdown): update implementation with new blogo.File and blogo.FS
This commit is contained in:
@@ -2,7 +2,6 @@ package markdown
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
"io/fs"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/yuin/goldmark"
|
"github.com/yuin/goldmark"
|
||||||
@@ -40,7 +39,7 @@ func (p *plugin) Name() string {
|
|||||||
return pluginName
|
return pluginName
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *plugin) Render(f fs.File, w io.Writer) error {
|
func (p *plugin) Render(f blogo.File, w io.Writer) error {
|
||||||
stat, err := f.Stat()
|
stat, err := f.Stat()
|
||||||
if err != nil || !strings.HasSuffix(stat.Name(), ".md") {
|
if err != nil || !strings.HasSuffix(stat.Name(), ".md") {
|
||||||
return blogo.ErrRendererNotSupportedFile
|
return blogo.ErrRendererNotSupportedFile
|
||||||
|
|||||||
Reference in New Issue
Block a user