Skip to content

Commit

Permalink
Merge pull request #29 from SuffolkLITLab/upgrade-docusaurus-3
Browse files Browse the repository at this point in the history
Upgrade docusaurus 3
  • Loading branch information
nonprofittechy authored Jan 24, 2024
2 parents b43fdf4 + fcbf3e0 commit 2d6a084
Show file tree
Hide file tree
Showing 6 changed files with 8,900 additions and 15,265 deletions.
7 changes: 5 additions & 2 deletions docs/practical-guide-docassemble/basic-troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ In the error message above, we can see that Docassemble is not able to locate th

## Docassemble usage errors

![This block is missing a 'question' directive. In file docassemble.playground10ErrorExamples:error.yml from package docassemble.playground10Error Examples: fields: - {Test: abc_123}](img/error_missing_question.png)
![This block is missing a 'question' directive. In file docassemble.playground10ErrorExamples:error.yml from package docassemble.playground10Error Examples: fields: - Test: abc_123](img/error_missing_question.png)

In the error above, the Docassemble author has forgotten to include a `question` "directive" in a block that Docassemble thinks is intended to be a question block. (The word "directive" has a lot of synonyms in Docassemble--sometimes it is called a "specifier" or a "key").

Expand All @@ -59,7 +59,10 @@ Even if we didn't know what a "directive" is, below the error message, the entir
Sometimes, you don't get an error message from Docassemble at all. Instead, you get an error message that indicates that Docassemble wasn't able to read the YAML file. A lot of subtle syntax errors can make the YAML file invalid.


<details><summary>Screen-reader friendly error</summary>
<details>
<summary>
Screen-reader friendly error
</summary>
<p>

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ With the **sample.yml** file open, type:

You should see **Installed**.

You can now go back to the browser at <http://localhost>, then go to the **‌Playground**
You can now go back to the browser at `http://localhost`, then go to the **‌Playground**

Let's run the code.

Expand Down
5 changes: 2 additions & 3 deletions docs/practical-guide-docassemble/translating-interviews.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,10 @@ event: ending
question: |
All done
subquestion: |
When you use the `comma_and_list()` function, the word "and"
When you use the comma_and_list() function, the word "and"
is translated so long as a words.yml is defined in the global configuration
file.
You selected ${ comma_and_list(field2.true_values()) }
```
The XLSX file phrases_es.xlsx has these contents:
Expand All @@ -165,7 +164,7 @@ docassemble.playground10language:language.yml | Question_2 | 8 | 650857596fe374d
docassemble.playground10language:language.yml | Question_3 | 0 | deeb6f5001d774a40a29140b74cf5011 | en | es | ending |
docassemble.playground10language:language.yml | Question_3 | 1 | c46c51f9085b1460607798292bcf5232 | en | es | "All done
" | Todo listo
docassemble.playground10language:language.yml | Question_3 | 2 | 0c5b0b5e1c20a9af00353e64f6d2a062 | en | es | "When you use the `comma_and_list()` function, the word "and" is translated so long as a words.yml is defined in the global configuration file. You selected ${ comma_and_list(field2.true_values()) } " | Cuando usas la función `coma_and_list()`, la palabra ""y"" se traduce siempre que se defina un archivo words.yml en la configuración global archivo. Seleccionó ${ comma_and_list(field2.true_values()) }
docassemble.playground10language:language.yml | Question_3 | 2 | 0c5b0b5e1c20a9af00353e64f6d2a062 | en | es | "When you use the comma_and_list() function, the word "and" is translated so long as a words.yml is defined in the global configuration file. " | Cuando usas la función `coma_and_list()`, la palabra ""y"" se traduce siempre que se defina un archivo words.yml en la configuración global archivo.

The XLSX file was created by visiting https://[myserver]/utilities and typing
"docassemble.playground10language:language.yml" in the "Download an interview phrase translation file" box.
Expand Down
28 changes: 14 additions & 14 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,19 @@ module.exports = {
// },
],
themes: [
// ... Your other themes.
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
// ... Your options.
// `hashed` is recommended as long-term-cache of index file is possible.
hashed: true,
// For Docs using Chinese, The `language` is recommended to set to:
// ```
// language: ["en", "zh"],
// ```
},
// ... Your other themes.
[
require.resolve("@easyops-cn/docusaurus-search-local"),
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
({
// ... Your options.
// `hashed` is recommended as long-term-cache of index file is possible.
hashed: true,
// For Docs using Chinese, The `language` is recommended to set to:
// ```
// language: ["en", "zh"],
// ```
}),
],
],
],

};
Loading

0 comments on commit 2d6a084

Please sign in to comment.