To enhance the extensibility of the FixIt theme, we provide some custom blocks that you can use in your project to achieve more functionality.
What’s the Meaning
By opening custom blocks, the extensibility of the FixIt theme is further enhanced.
After that, we can make full use of the basic features of the theme and build more upper-level components, so that the blog is full of unlimited imagination and creativity!
Build multiple upper-level components based on the FixIt theme, and finally use them in the top-level blog.
Entry File

The FixIt theme opens a unified custom template entry file layouts/_partials/custom.html.
In this file, the FixIt theme has defined all open custom blocks. If you want to further customize, you can copy it from the theme to your project and override it.
1
| cp themes/FixIt/layouts/_partials/custom.html layouts/_partials/custom.html
|
Custom Blocks
You can implement these blocks through define.
| Block Name | Description | Location |
|---|
custom-head | Head custom block | layouts/baseof.html |
custom-menu:desktop | Desktop menu custom block | layouts/_partials/layouts/header.html |
custom-menu:mobile | Mobile menu custom block | layouts/_partials/layouts/header.html |
custom-profile | Profile custom block | layouts/_partials/home/profile.html |
custom-comment | Comment system custom block | layouts/_partials/layouts/comment.html |
custom-aside | Sidebar custom block | layouts/posts/single.html |
custom-footer | Footer custom block | layouts/_partials/layouts/footer.html |
custom-widgets | Widgets custom block | layouts/_partials/layouts/widgets.html |
custom-assets | Assets custom block | layouts/_partials/layouts/assets.html |
custom-post__toc:before | Custom block before post toc | layouts/posts/single.html |
custom-post__toc:after | Custom block after post toc | layouts/posts/single.html |
custom-post__content:before | Custom block before post content | layouts/posts/single.html |
custom-post__content:after | Custom block after post content | layouts/posts/single.html |
custom-post__footer:before | Custom block before post footer | layouts/posts/single.html |
custom-post__footer:after | Custom block after post footer | layouts/posts/single.html |
Theme Configuration

To facilitate the management of introducing custom templates, you can specify the path of custom templates through the params.custom_partials parameter.
Custom partials must be stored in the /layouts/_partials/ directory.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| [params.custom_partials]
head = []
menu_desktop = []
menu_mobile = []
profile = []
aside = []
comment = []
footer = []
widgets = []
assets = []
post_toc_before = []
post_toc_after = []
post_content_before = []
post_content_after = []
post_footer_before = []
post_footer_after = []
|
How to Use
Now let’s take the custom home page custom-profile block as an example to demonstrate how to use custom blocks.
At first, create a custom file in the layouts/_partials/ directory, such as layouts/_partials/custom/profile.html.
Write any content:
1
| The quick brown fox jumps over the lazy dog.
|
Then specify the path of the custom template in the configuration file.
1
2
| [params.custom_partials]
profile = [ "custom/profile.html" ]
|
Visit the homepage, and you will see the custom content in the profile area.