Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Site.js
lib
Node Hugo
Commits
7555080e
Verified
Commit
7555080e
authored
Jun 28, 2020
by
Aral Balkan
Browse files
Add option to disable build drafts for Hugo server
parent
e642149d
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
7555080e
...
...
@@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on
[
Keep a Changelog
](
https://keepachangelog.com/en/1.0.0/
)
,
and this project adheres to
[
Semantic Versioning
](
https://semver.org/spec/v2.0.0.html
)
.
## [Unreleased]
## [1.4.1] - 2020-06-28
### Added
-
Option to disable build drafts for Hugo server; new fourth parameter in serve() method.
## [1.4.0] - 2020-05-05
...
...
index.js
View file @
7555080e
...
...
@@ -96,18 +96,22 @@ class Hugo {
// - a reference to the Hugo server process
// - the Hugo output so far
//
serve
(
sourcePath
=
'
.
'
,
destinationPath
=
'
public/
'
,
baseURL
=
'
http://localhost:1313
'
)
{
serve
(
sourcePath
=
'
.
'
,
destinationPath
=
'
public/
'
,
baseURL
=
'
http://localhost:1313
'
,
buildDrafts
=
true
)
{
const
args
=
[
'
server
'
,
`--source=
${
sourcePath
}
`
,
`--destination=
${
destinationPath
}
`
,
`--baseURL=
${
baseURL
}
`
,
'
--buildDrafts
'
,
'
--renderToDisk
'
,
'
--disableLiveReload
'
,
'
--appendPort=false
'
,
'
--disableFastRender
'
]
if
(
buildDrafts
)
{
args
.
push
(
'
--buildDrafts
'
)
}
return
this
.
serverWithArgs
(
args
)
}
...
...
package.json
View file @
7555080e
{
"name"
:
"@small-tech/node-hugo"
,
"version"
:
"1.4.
0
"
,
"version"
:
"1.4.
1
"
,
"description"
:
"A basic cross-platform interface to the Hugo binary from Node.js."
,
"main"
:
"index.js"
,
"scripts"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment