Skip to content

Instantly share code, notes, and snippets.

@MonteLogic
Created August 23, 2022 02:06
Show Gist options
  • Save MonteLogic/169a93ebaedfc58eeb3413725588cff7 to your computer and use it in GitHub Desktop.
Save MonteLogic/169a93ebaedfc58eeb3413725588cff7 to your computer and use it in GitHub Desktop.
This bash file when executed scaffolds a theme structure with just the bare essentials of a BBT (Block Based Theme).
#! /bin/bash
mkdir "$PWD"/bare-bbt
touch "$PWD"/bare-bbt/style.css
mkdir "$PWD"/bare-bbt/templates "$PWD"/bare-bbt/parts
cat << DELIMITER >> "$PWD"/bare-bbt/parts/header.html
<!-- wp:site-title /-->
DELIMITER
touch "$PWD"/bare-bbt/parts/header.html
cat << DELIMITER >> "$PWD"/bare-bbt/templates/index.html
<!-- wp:template-part {"slug":"header"} /-->
<!-- wp:query -->
<div class="wp-block-query">
<!-- wp:post-template -->
<!-- wp:post-title /-->
<!-- wp:post-date /-->
<!-- wp:post-content /-->
<!-- /wp:post-template -->
</div>
<!-- /wp:query -->
DELIMITER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment