I’m investigating if it would be feasible to move our approximately 2,000 page Joomla site to Hugo.
A bit about the current site
- This is a government website containing the usual things - lots of reports, guidance publications, news items and media statements, videos and so forth.
- It is updated relatively infrequently and irregularly - maybe once or twice a week as events dictate.
- The authorship was intended to be distributed, but in practice only one person does the content updates (me!)
How large is too large? and other questions
I am very keen to go with a static site instead of a CMS because of the latter’s potential for security exploits and the issues around upgrades and maintenance.
However, I noticed that many of the sites featured in the Hugo showcase are more along the lines of personal portfolios or blogs, so I wasn’t sure if it would be really feasible to have an approx 2,000 page site in Hugo (or indeed any other static site generator). I was hoping people with Hugo experience could advise on the following:
- Would a 2,000 page static site be a maintenance nightmare in practice?
- From this forum post (Page generation performance expectations) it does look like 2,000 pages would be a piece of cake for Hugo - is that right?
- Drupal and Joomla have the ability to schedule publications - eg, a media release to go live at 6am tomorrow. Is there a way to do this with Hugo?
- Is there a way to implement site search without using Google Custom Search? I have seen Lunr.js mentioned here on the forums, but am not sure if that would work for us as some of our pages are quite large (eg, 80-page Word documents converted to HTML).
Thanks very much for any advice you can provide!
Thanks @bep for your reply. I tend to agree with you on (1) - certainly doing a find/replace across files would be less tedious than in Joomla. I was wondering if you could please explain point 3 a bit more (sorry - I’m not even sure what things to google up at this stage!)
Does anyone know of any examples of a Hugo site of this size? It would be really terrific to help me push my case to go static.
explanation of (3):
You cannot schedule posts with hugo since it generates files on demand at a particular time.
You need to have a cron which does actions like marking a post as published with
publishDate and generating the site with
hugo command and transferring to the server location.
regarding the bigger examples of 1000+ pages, there have been some posts in this forum itself.
That is not a very accurate description.
When you write a post you can set a publish date, which can be in the future. You can also set an expiry date. This is the date that post gets published (and retracted if expiry date is set).
When you generate the site, only pages with a publish date that is valid Now is included. So you need to rebuild the site at intervals.
What the cron (which is how you schedule job on Unix, there is similar on Windows) job would then just have to.
- Build the hugo site
- Publish the site
The above looks heavy / complicated – but it really isn’t. Use
rsync or similar to just copy changed files to the web server etc.
It makes sense and I understand what further research I need to do now. Thanks very much.
There is also a
draft flag you can set to mark a page as a … draft, so not publish. You can then run
hugo server -D during development/article writing to see ALL the articles, including the drafts etc.