Skip to content

Instantly share code, notes, and snippets.

Created August 23, 2022 02:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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 /-->
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 -->
<!-- /wp:query -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment