# When rendering locally, can I enter the following command? 新人问一个关于本地渲染命令的问题

**URL:** <https://discourse.gohugo.io/t/when-rendering-locally-can-i-enter-the-following-command/48699>\
**Category:** 中文\
**Created:** [March 7, 2024, 12:55pm UTC](https://discourse.gohugo.io/t/when-rendering-locally-can-i-enter-the-following-command/48699 "2024-03-07T12:55:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChowRay](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/chowray/32/21525_2.png) [@ChowRay](https://discourse.gohugo.io/u/ChowRay)\
**Post date:** [March 7, 2024, 12:55pm UTC](https://discourse.gohugo.io/t/when-rendering-locally-can-i-enter-the-following-command/48699/1 "2024-03-07T12:55:50Z")

</div>

在本地渲染时，是否可以输入如下的命令？以及这样的命令顺序是否正确呢？纯新人，没有任何代码基础。感提前谢解答  
`hugo server -D --disableFastRender --gc --minify`

When rendering locally, can I enter the following command? And is this command sequence correct? Pure newbie, no coding knowledge. Thanks for the answer in advance  
`hugo server -D --disableFastRender --gc --minify`

---

<div class="post-metadata">

**Author:** ![CyrusYip](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/cyrusyip/32/20786_2.png) [@CyrusYip](https://discourse.gohugo.io/u/CyrusYip)\
**Post date:** [March 8, 2024, 2:17am UTC](https://discourse.gohugo.io/t/when-rendering-locally-can-i-enter-the-following-command/48699/2 "2024-03-08T02:17:46Z")

</div>

It’s okay if there is no error.

没报错就行。

---

<div class="post-metadata">

**Author:** ![ChowRay](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/chowray/32/21525_2.png) [@ChowRay](https://discourse.gohugo.io/u/ChowRay)\
**Post date:** [March 8, 2024, 3:19am UTC](https://discourse.gohugo.io/t/when-rendering-locally-can-i-enter-the-following-command/48699/3 "2024-03-08T03:19:49Z")

</div>

没有报错，我想请教，这样一个命令输入进去，清理和压缩命令是否还有效？  
或者说在本地渲染，使用这样的命令是否有意义？

---

<div class="post-metadata">

**Author:** ![razon](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/razon/32/14882_2.png) [@razon](https://discourse.gohugo.io/u/razon)\
**Post date:** [March 8, 2024, 12:48pm UTC](https://discourse.gohugo.io/t/when-rendering-locally-can-i-enter-the-following-command/48699/4 "2024-03-08T12:48:58Z")

</div>

> [@ChowRay](#):
>
> 没有报错，我想请教，这样一个命令输入进去，清理和压缩命令是否还有效？

你是指 `--gc` 和 `--minify` 吗？没报错一般都有效，标志的详细说明可以通过 `hugo server -h` 查看。  
不过我一般不用在本地使用 `--minify`，只在生产环境使用，可以有效减少网页传输大小，以提高速度。

---

<div class="post-metadata">

**Author:** ![ChowRay](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/chowray/32/21525_2.png) [@ChowRay](https://discourse.gohugo.io/u/ChowRay)\
**Post date:** [March 9, 2024, 12:44pm UTC](https://discourse.gohugo.io/t/when-rendering-locally-can-i-enter-the-following-command/48699/6 "2024-03-09T12:44:58Z")

</div>

> [@razon](#):
>
> > [@ChowRay](#):
> >
> > 没有报错，我想请教，这样一个命令输入进去，清理和压缩命令是否还有效？
> 
> 你是指 `--gc` 和 `--minify` 吗？没报错一般都有效，标志的详细说明可以通过 `hugo server -h` 查看。  
> 不过我一般不用在本地使用 `--minify`，只在生产环境使用，可以有效减少网页传输大小，以提高速度。

谢谢您的答复。
