Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Don't understand error message

18 views
Skip to first unread message

Tom Cloyd

unread,
Apr 18, 2024, 7:34:35 PM4/18/24
to nanoc
I am really struggling to get anything useful out of compilation error messages like this one:

tomc@pop-os:~/Dropbox/www/__Active/GeTI$ nanoc
Loading site… done
Compiling site…
kramdown warning(s) for <Nanoc::Core::CompilationItemRepView item.identifier=/pid099-book-review-beyond-the-veil.md name=default>
 No link definition for link ID ' ' found on line 177
     create  [0.06s]  _output/pid013-contact-us/index.html
     create  [0.00s]  _output/pid034-about-get-trauma-information/index.html
     update  [0.01s]  _output/pid099-book-review-beyond-the-veil/index.html

1. Which file has the error?

2. What does "ID ' '" mean?

3. "line 177"? This in particular baffles me. Does it refer to the source file or the output HTML file?

I'm thinking that perhaps clearer labeling would be helpful...

Tom


Trejkaz

unread,
Apr 18, 2024, 7:54:16 PM4/18/24
to na...@googlegroups.com
Hi.

Not a project maintainer or anything, but to hazard a guess,


On Fri, 19 Apr 2024 at 09:34, Tom Cloyd <tomclo...@gmail.com> wrote:
I am really struggling to get anything useful out of compilation error messages like this one:

tomc@pop-os:~/Dropbox/www/__Active/GeTI$ nanoc
Loading site… done
Compiling site…
kramdown warning(s) for <Nanoc::Core::CompilationItemRepView item.identifier=/pid099-book-review-beyond-the-veil.md name=default>
 No link definition for link ID ' ' found on line 177

Would there happen to be anything interesting on line 177 of pid099-book-review-beyond-the-veil.md?

TX

Denis Defreyne

unread,
Apr 19, 2024, 2:46:51 AM4/19/24
to na...@googlegroups.com
Hey both,

This is a warning emitted by Kramdown. Kramdown treats anything of the form [abc] as a link ID, and if there is no matching link definition, it’ll emit a warning.

In your case, I expect you have something of the form [ ] at or after line 117 in the pid099-book-review-beyond-the-veil.md file. It likely won’t be exactly on line 117, because the line number reported by Kramdown does not take the frontmatter into account (the real line will likely be further down).

You can work around this by escaping the square brackets. For example, [abc] would become \[abc\].

Let me know how this goes!

Cheers,

--
You received this message because you are subscribed to the Google Groups "nanoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nanoc+un...@googlegroups.com.

Message has been deleted

Tom Cloyd

unread,
Apr 20, 2024, 12:43:58 AM4/20/24
to nanoc
Thank you - this makes perfect sense. I'll try this and see if my problem is solved, as I think it will be. I have escaped "[...]" before. I was just not finding the errant bracket, but with your tip about line numbers I hope I now can. Will let you know.

t.

Tom Cloyd

unread,
Apr 22, 2024, 8:35:08 PM4/22/24
to nanoc
All is well for me now. I did understand about escaping square brackets with Kramdown, but couldn't FIND the brackets needing this fix. In retrospect, I feel plain dumb for not figuring out the front matter/ line count issue on my own. I'm now handling THAT problem just fine, which allows me to handle the other problem.

As always, Denis, thanks for you assistance! ( and Trejkaz for responding to my distress! )

t.
Reply all
Reply to author
Forward
0 new messages