Strategy for Hextra Template

I have a multilingual Hugo site that has 4,000 pages. For example:

  • website. com/category1
  • website. com/ja/category1
  • website. com/zh/category1
    and so on

I decided to switch to the Hextra theme as it has search, tailwind, and a docs style.

However, I found that it builds slower the more pages there are.

https://discourse.gohugo.io/t/slow-builds-with-hextra-theme/46492

My plan is to split the site into 4 sites based on the major categories, for example:

website1:

  • category1. website. com
  • category1. website. com/ja
  • category1. website. com/zh

website2:

  • category2. website. com
  • category2. website. com/ja
  • category2. website. com/zh

This would be more difficult to maintain, but would allow more pages. Is this a good idea? Is there any template that allows multilingual search and thousands of pages?

I would suggest you stick with your current setup and wait for a fix in Hextra, which should not be too hard by quickly looking at the link you provide. The Hextra people seem to be very active. 4000 pages isn’t big data for Hugo (and that will be even more true in the next version, coming soon …)

3 Likes

Hi, author of Hextra here.
Thanks for considering using it. :grinning:

Please don’t split your site into 4, but rather wait for the fix. Sorry for the inconvenience.

As pointed out in the above link, the cause for the slower build has been identified. I’ll work on improving the performance for the next release.

In the meantime, I doubt that the offline full-text search would work well for 4000 pages as the index file would get really huge.

For any feature requests or complaints, feel free to post them on the GitHub repository.

3 Likes

Have you considered an option where you only only index the page metadata (title etc.) and the page headings(fragments (.Fragments.Identifiers) ? That should be fairly compact and good enough for lots of use cases.

2 Likes

Thank you for the reply, that’s a good idea! I’ll add configuration flags for these :smiley:

I’ve asked a user with 4000 pages to try including only the titles for the index data: Optimize search feature · imfing/hextra · Discussion #112 · GitHub
It would be better to have the headings as well in the index

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.