Sass Hugo检测到css更改,但输出不';不变

Sass Hugo检测到css更改,但输出不';不变,sass,hugo,Sass,Hugo,我正在用雨果建立一个网页 这是我的网站标题: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Website</title> <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0" /> --

我正在用雨果建立一个网页

这是我的网站标题:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Website</title>
    <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0" /> -->
    <meta name="referrer" content="no-referrer" />
    <link rel="icon" href="/img/favicon.ico" type="image/x-icon" />
    <link
      rel="stylesheet"
      href="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.9.2/tiny-slider.css"
    />

    <!-- tried this as per suggestion from Hugo forums
    {{ $sassIncludes := (slice "node_modules" "assets/scss/vendor" "assets/scss/components") }}
    {{ $target := "styles/main.css" }}
    {{ if .Site.IsServer }}
        {{ $cssOpts := (dict "targetPath" $target "enableSourceMap" true "includePaths" $sassIncludes ) }}
        {{ $styles := resources.Get "/css/main.scss" | toCSS $cssOpts }}
        <link rel="stylesheet" href="{{ $styles.Permalink }}" media="screen">
    {{ else }}
        {{ $cssOpts := (dict "targetPath" $target "includePaths" $sassIncludes ) }}
        {{ $styles := resources.Get "/css/main.scss" | toCSS $cssOpts | postCSS | minify | fingerprint }}
        <link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen">
    {{ end }} -->

    {{ $style := resources.Get "/css/main.scss" | resources.ToCSS | minify | fingerprint}}

    <link rel="stylesheet" href="{{ $style.RelPermalink }}"/>
  </head>

  <body>
    <header>
      <div class="nav-bar">
        <a class="top-logo" href="/">
          <img src="/img/logo.svg" />
        </a>
    </header>
  </body>
</html>
config.toml:

baseURL = "http://example.org/"
languageCode = "en-us"
title = "Website"
assetDir = "static"
我在macOS上运行
hugo server
命令。我正在更改样式中的背景色。以下是终端输出:

thatsme/../website-landing (master↑1|✚7…) % hugo server                                        
Building sites … WARN 2020/05/18 12:27:34 found no layout file for "HTML" for kind "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2020/05/18 12:27:34 found no layout file for "HTML" for kind "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

                   | EN  
-------------------+-----
  Pages            | 14  
  Paginator pages  |  0  
  Non-page files   |  0  
  Static files     | 19  
  Processed images |  0  
  Aliases          |  0  
  Sitemaps         |  1  
  Cleaned          |  0  

Built in 17 ms
Watching for changes in /Users/thatsme/git/website-landing/{archetypes,content,data,layouts,static}
Watching for config changes in /Users/thatsme/git/website-landing/config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

Change of Static files detected, rebuilding site.
2020-05-18 12:27:42.202 +0200
Syncing css/main.scss to /

样式更改仅在重新启动服务器时应用。Html更改得到了正确的应用。

我尝试在chrome控制台中禁用缓存,尝试运行
hugo服务器-w--noHTTPCache--disableFastRender-v
如果我在
{{$style:=resources.Get”/css/main.scss“|resources.ToCSS | minify fingerprint}中更改内容,输出将得到更新。
。例如,如果我正在删除或添加
指纹
thatsme/../website-landing (master↑1|✚7…) % hugo server                                        
Building sites … WARN 2020/05/18 12:27:34 found no layout file for "HTML" for kind "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2020/05/18 12:27:34 found no layout file for "HTML" for kind "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

                   | EN  
-------------------+-----
  Pages            | 14  
  Paginator pages  |  0  
  Non-page files   |  0  
  Static files     | 19  
  Processed images |  0  
  Aliases          |  0  
  Sitemaps         |  1  
  Cleaned          |  0  

Built in 17 ms
Watching for changes in /Users/thatsme/git/website-landing/{archetypes,content,data,layouts,static}
Watching for config changes in /Users/thatsme/git/website-landing/config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

Change of Static files detected, rebuilding site.
2020-05-18 12:27:42.202 +0200
Syncing css/main.scss to /