问题
How to insert dynamic gist code in the middle of posts generated by Wagtail (Django Cms)?
I searched the documentation of wagtail but did not find anything that could help me automatically insert the github codes.
回答1:
Gist is one of the built in content types supported by Wagtail's embedded content feature. Within a rich text field, editors can use the 'media' toolbar icon to enter the URL to the Gist page, and it will appear embedded in the rich text content. Within a StreamField, the developer can EmbedBlock
to the set of available block types, and the editor will then be able to enter the Gist URL into that field.
来源:https://stackoverflow.com/questions/54723046/how-embed-gist-in-wagtail