4

How can I move blocks from pug templates in source into pug templates in a theme?

New to hexo. Working on a hexo-theme-bootstrap4-starterkit theme.

Made some pug template using pug -w index.pug. Trying to move my content out of themes/bootstrap4-starterkit and into source

My index.pug file has something like this:

extends themes/layout.pug

block scripts
  script(src="//cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.bundle.min.js", crossorigin="anonymous")

block content
  section#home
    .jumbotron.mt-4
      h1.display-4 Sooooooo Good!

And the layout.pug file is more or less:

html(lang="en")
  head
    meta(charset='UTF-8')
    ...
    block scripts

    block opengraph
      meta(name="description", content=page.summary||config.subtitle)
      ...

  body
    main#main.container
      block content

    footer
      block footer
      include _partial/footer
Michael Cole
  • 15,473
  • 7
  • 79
  • 96

0 Answers0