Closed RealRichi3 closed 2 months ago
:wave: @RealRichi3!
In the rOpenSci dev guide, built with babelquarto, we use parts: https://github.com/ropensci/dev_guide/blob/main/_quarto.yml so I suspect your problem might be a YAML formatting issue. (not saying there can't be a bug here, this is also possible :sweat_smile:)
Could you try removing the space before the hyphens in chapter lists? Like so:
project:
type: book
output-dir: _book
website:
title: JSQuarto Documentation
description: Documentation for JSQuarto, a tool for generating JavaScript
package API reference documentation using Markdown and Quarto.
book:
title: Open Innovation Platform Documentation
chapters:
- index.md
- part: Globals
chapters:
- chapters/globals/globals.qmd
- part: Utilities
chapters:
- chapters/functional doc/utilities/constructidentifier.qmd
- chapters/functional doc/utilities/commentsutil.qmd
- chapters/functional doc/utilities/components.qmd
- chapters/functional doc/utilities/file.qmd
- chapters/functional doc/utilities/logger.qmd
- chapters/functional doc/utilities/parser.qmd
- chapters/functional doc/utilities/writer.qmd
- part: Tutorials
chapters:
- chapters/tutorials/contributing/improving_documentation.qmd
- chapters/tutorials/contributing/raising_issues.qmd
- chapters/tutorials/contributing/raising_pr.qmd
- chapters/tutorials/how_to/adding_tutorials.qmd
- chapters/tutorials/how_to/optimizing_workflow.qmd
- chapters/tutorials/how_to/starting_the_project.qmd
- chapters/tutorials/project_structure.qmd
- chapters/tutorials/environment_setup.qmd
- chapters/tutorials/changelog.qmd
- chapters/tutorials/localization.qmd
format:
html:
theme: cosmo
highlight: github
toc: true
number-sections: false
babelquarto:
languagecodes:
- name: ar
text: Version in ar
- name: en
text: Version in en
mainlanguage: en
languages:
- ar
- en
lang: en
title-ar: Title in ar
description-ar: Description in ar
author-ar: Author in ar
title-en: Title in en
description-en: Description in en
author-en: Author in en
I don't have time to try it out just now but if it doesn't work, please ping me again!
Thanks @maelle, i'll try it out and get back to you
I just tried it, but it returned the same error
Output created: _book/index.html
ERROR: Project _quarto.yml validation failed.
In file _quarto.yml
(line 12, columns 5--9) property name part is invalid
11: - index.md
12: - part: Globals
~~~~~
13: chapters: chapters/globals/globals.ar.qmd
ℹ The error happened in location book:chapters:1:part.
In file _quarto.yml
(line 13, columns 5--13) property name chapters is invalid
12: - part: Globals
13: chapters: chapters/globals/globals.ar.qmd
~~~~~~~~~
14: - part: Utilities
ℹ The error happened in location book:chapters:1:chapters.
Stack trace:
In file _quarto.yml
(line 12, columns 5--9) property name part is invalid
11: - index.md
12: - part: Globals
~~~~~
13: chapters: chapters/globals/globals.ar.qmd
ℹ The error happened in location book:chapters:1:part.
In file _quarto.yml
(line 13, columns 5--13) property name chapters is invalid
12: - part: Globals
13: chapters: chapters/globals/globals.ar.qmd
~~~~~~~~~
14: - part: Utilities
ℹ The error happened in location book:chapters:1:chapters.
at readAndValidateYamlFromFile (file:///opt/quarto/bin/quarto.js:20470:15)
at async file:///opt/quarto/bin/quarto.js:72903:26
at async projectContext (file:///opt/quarto/bin/quarto.js:72737:26)
at async render (file:///opt/quarto/bin/quarto.js:81779:19)
at async Command.fn (file:///opt/quarto/bin/quarto.js:81954:32)
at async Command.execute (file:///opt/quarto/bin/quarto.js:8104:13)
at async quarto (file:///opt/quarto/bin/quarto.js:114968:5)
at async file:///opt/quarto/bin/quarto.js:114986:9
I'll try it out tomorrow or next week then!
Alright, thanks
Some progress in #33. I can build the book but not all links are created. I'll explore further.
I'd recommend not using space in folder names.
@RealRichi3 I'll soon merge my PR. However for the links to work for the homepage of the different versions you'll have to rename index.md
to index.qmd
(and to update the _quarto.yml
file accordingly).
Thanks @maelle, i'll try it again and give you feedbck
It works fine now, thanks @maelle
Awesome, glad to hear :tada: Thank you for catching not one but :sparkles: two :sparkles: bugs, that was an efficient bug report. :wink:
Description
I'm working on a project and wee use babelquarto to integrate the different languages into the rendered quarto website, but we ran into an issue earlier and haven't found away around it.
The issue is when i add multiple languages in the _quarto config and i use the
part
keyword multiple times babelquarto fails to render the book. It returns an error sayingproperty name part is invalid
Here is a sample of my current
_quarto.yml
configurationHere is the error returned when i try to render the book
See
Please see the parent issue Open-Science-Community-Saudi-Arabia/JSquarto#35 for more info on how to replicate it