codeflood logo

Posts tagged in Headless

Minimal Head Part 9: Conclusion

One of the reasons I chose to use Bash to orchestrate the build process for my minimal static site generator was due to it's ubiquity. Bash has been around for a long time and it's present on the build platforms I most frequently use, not to mention on my dev machines. So to wrap up this series, I wanted to have the build process run not only on Github, but also Bitbucket.

Minimal Head Part 8: Layouts and Components

I added multiple page types back in Part 6: Multiple Page Types of this series. But with multiple different pages I'm using multiple different HTML templates, duplicating quite a bit of HTML between them. I want to make sure I keep all that HTML boilerplate consistent, which I'll do with "layouts". I also want to create some "components" which can be used on any page to display specific content across many pages. I'll explore these concepts in this post.

Minimal Head Part 7: Refactor

In the last post of this series I duplicated a lot of code in the script file. To keep the script clean as I extend it further (and add more page types) I need to spend some time refactoring to improve the structure of the script. I can also apply the DRY principal (Don't Repeat Yourself) by extracting duplicated logic to separate functions.

Minimal Head Part 5: List Page

In previous posts of this series I showed how to generate pages for each blog post I had in Content Hub ONE. Now the pages are generated I need some way to navigate and display the list of blog posts to users. I need to generate a list page (index page) that shows all the blog posts and provides links to them.

Minimal Head Part 4: Page All Results

In the previous posts in this series I've been processing multiple pages by using the allBlogPost query field which returns a list of blog post content items. But at some point I'm going to hit the page size limit and a single query won't do. I need to rework my querying to be able to page over all the results in Experience Edge.

Minimal Head Part 3: More Field Types

So far in this series I've only used 2 types of fields: Short text and Rich text. But the blog post content type in my Content Hub ONE tenant has some additional field types which I want to use: Date and time and Select. In this post I'll extend the blog post output to make use of these additional fields.