Quote by kiteares
It's all over the place
It really isn't and also doesn't contradict itself.
The section at the top (of the UNR page) is about normal direct speech. In AE, you've often got double quotes, in BE usually single quotes - at Lush, either is fine, but be consistent - but the punctuation (comma, period) will always be inside the quotation marks.
Leia said, "I love you."
"I know," said Han.
Leia said, 'I love you, you wanker.'
'Blimey,' said Han.
It's never gonna be ["Rruuuuurrrr", wailed Chewie.] or ['Oh, never mind', C3PO sighed.]. The comma (or other punctuation) goes inside the quotation either way.
**
The section below that (on the UNR page) is about the style of quoting/reporting single words, which apparently is slightly different.
AE: Biden called this bill "total malarkey."
BE: Sunak called this bill "utter bollocks".
Period inside, full stop outside.
(Also note that no moderator here is going to send your story back because of AE/BE punctuation around reporting/quoting. The problem lies with dialogue formatting (see Leia & Han above) which, when done sloppily, makes it harder/impossible to know who's saying what, and also just doesn't look tidy.)
**
We often see commas outside of quotation marks because, in other languages, they actually do go outside of the quotation marks, e.g. in German ["Welch Unsinn", sagte Goethe.]. We often see ["Who are you?", he asked.](additional comma) because that's how it's done in other languages. Hence that confusion.
Unfortunately, some people infer from that that punctuation marks always go outside the quotation marks, so we get adventurous things like ["Where is the male G-spot"? Jeff wanted to know.] or even ["Have you seen my G-spot" asked Jeff?]. (Please don't do that.) (Also, it's up your butt, Jeff. Happy hunting!)