Inline Gallery Mystery Solved!
If I put the gallery at the top of a post, it got included in the post summary.
There were a few times when posts with galleries of images that were also the 'index.html' post (the featured post) had a problem. Their gallery would have more images than it should.
The mystery is solved.
Any blogging system needs to have article summaries. With the Pelican system, summaries are created one of two ways.
- Adding a
'Summary: put-your-summary-here.'line in the metadata section of the content source file header, or
- Letting Pelican create the summary for you automatically.
If you choose (as I did) to let Pelican do it, Pelican uses a configuration parameter called 'SUMMARY_MAX_LENGTH' to determine how many characters of text to include in the summary. Then it pulls that many characters out of the body of the article starting at the top. The default value for that parameter is 50.
Under most circumstances this works just fine. But the 'index.html' template is unique: it creates a page with the latest post at the top and summaries of all the other posts beneath.
Each post on the site shows its title, some information (article.info), and then the article.summary, in this case, whatever is in the first 50 characters.
Phibos at Github gave me a hint, and it proved to be the nudge that got me off high center. Thanks, @phibos!
Learn something new every day.