question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using tilde `~` (null) in antora.yml should not produce a warning

See original GitHub issue

When using the following in antora.yml:

name: admin
title: Administration
version: 'master'
nav:
  - modules/ROOT/nav.adoc
asciidoc:
  attributes:
    toc: ~

I get the following warning message:

AsciiDoc attribute 'toc' is null in /path/to/antora.yml: Will be treated as unset. Use either false to explicitly unset, or set by providing for example an empty string ''

According to Dan:

that is the correct syntax. valid values are false, nil (also written as ~), or any of the enumerated values. in a playbook, using false and nil are preferred over using !toc (since it’s cleaner and easier to control keys) see https://docs.antora.org/antora/2.3/playbook/asciidoc-attributes/#hard-unset

The message is a bit misleading and I think we should not warn when the value is explicitly null (~).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ahus1commented, Oct 28, 2020

Will be part of 0.31.38. Waiting for TravisCI to build the release.

1reaction
ahus1commented, Oct 28, 2020

Thanks for reporting this.

Now I know something more about YAML: When there is a ~ without quotes, the parser will present it to the code as null.

Will remove the corresponding lines in AsciiDoc.java for the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's New in Antora 3.0
In Antora 3, assign the tilde ( ~ ) to the version key in a component version's antora. yml file to specify it...
Read more >
What is the purpose of tilde character ~ in YAML?
1 Answer 1 ... The tilde is one of the ways the null value can be written. Most parsers also accept an empty...
Read more >
Use tilde instead of null · Issue #19 · snoyberg/yaml
I disagree: outputting the canonical form should be the default behavior. Switching to tilde as default behavior would be a tweak to the...
Read more >
Aug 21, 2020
TIL: the tilde character '~' can be used to denote NULL values in YAML. It's scary to think that so much modern infrastructure...
Read more >
https://pagure.io/fedora-docs/system-administrator...
-If you do not have the appropriate key installed to verify the signature, the message contains the word `NOKEY`: - -[subs="attributes"] ----- -warning: ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found