Closed diguage closed 2 months ago
And there is a problem: the diagram which is in the document, is not included was converted to the project base dir, not the build dir(public
).
I found the solution:
workingFolderCurrent = true
to the config file:# https://gohugo.io/content-management/formats/
[markup]
[markup.asciidocExt]
backend = 'html5'
extensions = ["asciidoctor-comment-links", "asciidoctor-diagram"]
safeMode = 'unsafe'
sectionNumbers = false
trace = false
verbose = false
workingFolderCurrent = true
[markup.asciidocExt.attributes]
icons = "font"
source-highlighter = "rouge"
rouge-style = "monokai"
source_attr = "indent=0,subs=\"attributes,verbatim,quotes\""
image_attr = "align=center,width=100%"
blockdiag-fontpath = "/tmp/SourceHanSerifSC-Regular.otf"
--destination=public/
to the hugo
command.$ hugo server --destination=public/ -v
I found the solution:
- add
workingFolderCurrent = true
to the config file:# https://gohugo.io/content-management/formats/ [markup] [markup.asciidocExt] backend = 'html5' extensions = ["asciidoctor-comment-links", "asciidoctor-diagram"] safeMode = 'unsafe' sectionNumbers = false trace = false verbose = false workingFolderCurrent = true [markup.asciidocExt.attributes] icons = "font" source-highlighter = "rouge" rouge-style = "monokai" source_attr = "indent=0,subs=\"attributes,verbatim,quotes\"" image_attr = "align=center,width=100%" blockdiag-fontpath = "/tmp/SourceHanSerifSC-Regular.otf"
- add
--destination=public/
to thehugo
command.$ hugo server --destination=public/ -v
This resolves the problem:
And there is a problem: the diagram which is in the document, is not included was converted to the project base dir, not the build dir(
public
).
This was erroneously re-opened.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Desc
I want to use asciidoctor-diagram in the Hugo. I test the feature.
run
hugo server
, then throw an error:Failed to load AsciiDoc document - No such file or directory @ rb_sysopen - /diagrams/block.diag
.So, I want to set the project base dir as a asciidocotor variable which be used to find the
/diagrams/block.diag
.I googled the document, and found the doucument: Configure Hugo | Hugo, there is some variables, such as
project
,contentDir
and so on.But when I used the variables as the document, the variables did not convert to the value:
The param is
-a include_dir=:project/static
, not-a include_dir=/path/to/hugo/static
.Hugo version
config.toml
Hugo project
block.diag
seq.diag
tree