diff options
Diffstat (limited to 'management')
-rw-r--r-- | management/editor/editor.go | 1 | ||||
-rw-r--r-- | management/manager/process.go | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/management/editor/editor.go b/management/editor/editor.go index 2a9183b..6b55a38 100644 --- a/management/editor/editor.go +++ b/management/editor/editor.go @@ -9,7 +9,6 @@ import ( // Editable ensures data is editable type Editable interface { - ContentName() string Editor() *Editor MarshalEditor() ([]byte, error) } diff --git a/management/manager/process.go b/management/manager/process.go index ec09e45..ad6da94 100644 --- a/management/manager/process.go +++ b/management/manager/process.go @@ -5,16 +5,16 @@ import ( "strings" "unicode" - "github.com/bosssauce/ponzu/management/editor" + "github.com/bosssauce/ponzu/content" "golang.org/x/text/transform" "golang.org/x/text/unicode/norm" ) // Slug returns a URL friendly string from the title of a post item -func Slug(e editor.Editable) (string, error) { +func Slug(i content.Identifiable) (string, error) { // get the name of the post item - name := strings.TrimSpace(e.ContentName()) + name := strings.TrimSpace(i.String()) // filter out non-alphanumeric character or non-whitespace slug, err := stringToSlug(name) |