diff --git a/README.md b/README.md index 40a271e..5be0dcd 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ Some of the configuration options are: * `params.social_media`: social media links shown in the footer * `params.search`: search settings * `params.author`: author used in the JSON-LD + * `params.showAuthor`: show author name in article list and article page * `params.jsonLD`: enable or disable JSON-LD (default disabled) * `params.pwa`: enable or disable PWA (default disabled) diff --git a/assets/icons/user.svg b/assets/icons/user.svg new file mode 100644 index 0000000..97d5d73 --- /dev/null +++ b/assets/icons/user.svg @@ -0,0 +1,7 @@ + diff --git a/config/_default/params.toml b/config/_default/params.toml index 03d1f5a..7c9b866 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -15,6 +15,8 @@ showReadingTime = true # use structure json-ld for articles jsonLD = false +showAuthor = false + [author] name = "Hugo Author" email = "user@example.com" diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index da33714..761a892 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -8,6 +8,8 @@ contentTypeName = "post" jsonLD = true +showAuthor = true + [author] name = "Xiaoliang Wang" email = "user@example.com" diff --git a/exampleSite/content/post/image-process/index.md b/exampleSite/content/post/image-process/index.md index 13685ea..97890dc 100644 --- a/exampleSite/content/post/image-process/index.md +++ b/exampleSite/content/post/image-process/index.md @@ -1,5 +1,5 @@ +++ -author = "Hugo Authors" +# author = "Hugo Authors" title = "Image Process" date = "2023-12-01" description = "Demo of Hugo's image processing" diff --git a/exampleSite/content/post/image-process/index.zh-cn.md b/exampleSite/content/post/image-process/index.zh-cn.md index 9e0b5f7..b879de2 100644 --- a/exampleSite/content/post/image-process/index.zh-cn.md +++ b/exampleSite/content/post/image-process/index.zh-cn.md @@ -1,5 +1,5 @@ +++ -author = "Hugo Authors" +# author = "Hugo Authors" title = "图片处理" date = "2023-12-01" description = "关于Hugo中图片处理的示例" diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 4ef02b9..7e0e10d 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -32,6 +32,7 @@