mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 06:00:25 +03:00
Create hugo_stats.json if it's mounted but does not exists
A common pattern for Tailwind 3 is to mount that file to get it on the server watch list. A common pattern is also to add hugo_stats.json to .gitignore. This has meant that the first time you start the server (no hugo_stats.json), it just doesn't work as expected. Fixes #11264
This commit is contained in:
parent
f1a061e9ed
commit
7ae62f4aa3
4 changed files with 37 additions and 4 deletions
18
testscripts/unfinished/server__watch_hugo_stats.txt
Normal file
18
testscripts/unfinished/server__watch_hugo_stats.txt
Normal file
|
@ -0,0 +1,18 @@
|
|||
hugo server &
|
||||
|
||||
waitServer
|
||||
stopServer
|
||||
! stderr .
|
||||
|
||||
exists hugo_stats.json
|
||||
|
||||
-- hugo.toml --
|
||||
title = "Hugo Server Test"
|
||||
baseURL = "https://example.org/"
|
||||
disableKinds = ["taxonomy", "term", "sitemap"]
|
||||
[module]
|
||||
[[module.mounts]]
|
||||
source = "hugo_stats.json"
|
||||
target = "assets/watching/hugo_stats.json"
|
||||
-- layouts/index.html --
|
||||
<body>Home</body>
|
Loading…
Add table
Add a link
Reference in a new issue