I'd like to add Twitter Card via meta tag to mdBook.
How can I add meta tags (example below) to mdBook?
<meta name="twitter:card" content="summary"></meta>
Current workaround is to execute sed command after mdbook build.
" /> " /> "/>
I'd like to add Twitter Card via meta tag to mdBook.
How can I add meta tags (example below) to mdBook?
<meta name="twitter:card" content="summary"></meta>
Current workaround is to execute sed command after mdbook build.
On
As noted in https://rust-lang.github.io/mdBook/format/theme/index.html, you can specify a custom head.hbs file (which you can put into theme/) and add custom <head> tags to it.
You can use the theme feature of mdBook.
Create a random mdBook with
--themeoption.Confirm
theme/directory is created.Copy
theme/directory to your mdBook directory.Edit
theme/index.hbs.Execute
mdbook buildas usual.