# Theme Components and blocks

**URL:** <https://discourse.gohugo.io/t/theme-components-and-blocks/27882>\
**Category:** support\
**Created:** [August 28, 2020, 9:17am UTC](https://discourse.gohugo.io/t/theme-components-and-blocks/27882 "2020-08-28T09:17:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsolva](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rsolva/32/12364_2.png) [@rsolva](https://discourse.gohugo.io/u/rsolva)\
**Post date:** [August 28, 2020, 9:17am UTC](https://discourse.gohugo.io/t/theme-components-and-blocks/27882/1 "2020-08-28T09:17:03Z")

</div>

I’m building a [Theme Component](https://gohugo.io/hugo-modules/theme-components) to speed up my development of new Hugo sites. As with any development, I repeated myself alot and I’m making this to scratch my own itch. I’ll publish the code under AGPLv3 as soon as I have polished it a bit and documented the main features and patterns.

I’m wondering if it is possible to define [blocks](https://gohugo.io/templates/base/) in a site-wide way on the theme I’m building on top of my base theme.

Let me explain a bit further. Blocks are awesome if I want to add or replace code in a single, list or section page – but what if I want to make site-wide changes? If I add a `_layout/baseof.html` to my custom theme on top of the base theme in an attempt to define a block, it will replace the whole baseof.html from the base theme.

**Does anyone know of a way to define a block in a theme component so that it affects all pages of a site?**
