hugo-next / hugo-theme-next

Easily & powerful theme for Hugo engine.
https://hugo-next.eu.org
MIT License
209 stars 37 forks source link

Support Golang module import Hugo NexT #70

Open elkan1788 opened 1 year ago

elkan1788 commented 1 year ago

请按照此新功能模版提供相关信息,如详细的功能描述或同类效果屏幕截图,这将有助于我们进行调查。 (Please follow this new feature template to provide relevant information, such as detail description for feature or some screenshots, which will help us investigate.)

新功能描述 (New feature description)

参考Hugo官方的主题生成站点,发现Hugo的主题除了git submodule模式引入之外,还支持使用Golang 的模块管理功能导入,考虑引入此功能,便于Golang用户使用。

效果参考截图 (Screenshots if it possible)

kaolengmian7 commented 1 year ago

这个需求我没太懂。你指的Golang模块管理功能是这个吗https://gohugo.io/hugo-modules/use-modules/

elkan1788 commented 1 year ago

这个需求我没太懂。你指的Golang模块管理功能是这个吗https://gohugo.io/hugo-modules/use-modules/

是的,这个似乎是 Golang 的包管理功能,你比较熟悉,可以研究看看😁

kaolengmian7 commented 1 year ago

👌,我先看看文档

pplmx commented 1 year ago

这个好像已经可以了

initialization

hugo mod init
hugo mod get -u https://github.com/hugo-next/hugo-theme-next

config

# Configure theme by hugo module
module:
    imports:
        - path: github.com/hugo-next/hugo-theme-next