
hugo version:查看hugo版本
開啟終端機,輸入hugo version,就可看到目前所使用的hugo版號。
hugo new site 資料夾名稱:建立新hugo站台
當要建立一個hugo網站,只需輸入hugo new site 資料夾名稱,再按下enter鍵後,隨即就會產生hugo的基本網站架構。

hugo:網站發佈
當要把網站發佈時,只需輸入hugo,接著網站的資料,就會存放在pubilc的資料夾中。

hugo server/hugo server -F :預覽網站
由於hugo的程式,內建就有含web功能,因此當要預覽網站時,可輸入hugo server,當後方加入-F時,就是不限文件的發佈日期,全部顯示。

hugo server –bind="0.0.0.0" –baseUrl=http://xxx.xxx.xxx.xxx/ -D -F:指令發佈的域名或IP
當使用hugo server時,可快速的預覽網站,但IP為localhost,因此手機是無法預覽的,所以這時就可綁定IP,讓手機可連進去預覽網頁,讓網頁在實際裝置上預覽是否有跑版,或是特效不支援的狀況。

以上是梅干常使用到的指令,分享給各位讓剛接觸hugo的朋友有所幫助,若各位也有不錯的指令,也歡迎分享,梅干也會不定期的更新。