>Support>Static website generation case study
Mergemill Pro is a versatile tool that can tackle a wide variety of data processing tasks. We recently used it for a project to explore business opportunities for developers while bringing the best benefits to clients.
Our client publishes a Christian news weekly that has an online version. For years their site was driven by a database, because the number of articles was too many to be published manually and they wanted their articles to be searchable. We created the dynamic site for them. It went online in year 2000 and worked till we were asked to revamp it a few months ago. We proposed to turn it into a static website, and suggested using Google to provide the article search facility. We were expected to automate the publishing process as much as possible.
When we started the project, the Alexa ranking of the site hovered around a million and there was very little search engine traffic. In front of us was an old database of about 25,000 Chinese articles in the outdated Big5 text encoding. This encoding has incomplete mapping for the common textual characters used in the publication, and therefore leads to unrecognizable characters in the online articles. Our important first task was to migrate the data to a new DBMS that supports Unicode, as well as to clean up the data and convert the encoding in the process. Mergemill Pro was our life-saver in this part of the project.
The second goal was to build traffic and grow the readership. Below was our to-do list:
- Carefully hand-code the HTML templates to make every byte count, because server performance is important to both search engines and human visitors.
- Duplicate the Traditional Chinese articles for readers in Taiwan and Hong Kong, and convert the copies to Simplified Chinese which is used in mainland China.
- Incorporate Search Engine Optimization (SEO) strategies in coding the templates and structuring the entire website.
- Incorporate social media share buttons in each article. The buttons are to be customized by Mergemill Pro for each of the now 50,000 articles.
Our third goal was to automate the entire Chinese web publishing process so that the client is involved as little as possible in creating the web pages. The scheduled autorun feature of Mergemill Pro was designed to meet such needs.
We set up a simple FileMaker Pro database to manage the articles and associated data, with ten scripts that automatically search for appropriate articles, sort them, and export them to specific locations. When the articles for an issue is ready to be published, all that the user needs to do is to select the ten scripts one by one on a menu. We also set up a total of 36 jobs under 4 projects in Mergemill Pro to pick up the data exports at midnight each Sunday, and to automatically do the following:
- Generate new web pages and save them to designated locations with subfolders created automatically where necessary.
- Update web pages like the sitemap.
The new site was online at the end of March, 2012. Search engine traffic began to build up daily. Five months later the average daily visits has increased over 500%, with over 60% from search engines. We asked for a brief feedback from our client, and below is what we got––translated from Chinese––from Kit Lai, their editor:
- We wanted the new website to be friendly to various access devices, from computers to smart phones. We also wanted the content to be in both Traditional and Simplified Chinese. These are all done.
- We expected the website to be easily searchable on the Web, and we find that our articles do appear on Google search results.
- The new site-search for articles on our site works much better than expected.
- The new publishing system works with more Chinese characters, especially those used solely in Hong Kong, and the new system is more convenient in creating the web pages.
- Mergemill Pro's greatest strengths in the new system are convenience, speed, and scheduled processing.
Our original idea was to connect to the client's FileMaker Pro content management database via ODBC, and automatically pull out the needed data at scheduled time to update the website. This proved to be not an option. We need to use Chinese in the entire process, including field and table names in the database. ODBC and SQL Select statements don't work in this case. Providing scripts in FileMaker Pro easily avoids these problems, and gives our client the control on when the new issue is ready to be published. The extra step of simply selecting the scripts on a menu is not considered a negative by our client.
If our client misses the scheduled autorun, Mergemill Pro simply regenerates the previous issue using the old exported data that are still in designated locations. When the articles are ready and exported later, the client only needs to select and run the projects manually to publish the new issue.
:: Nested Loops
Nested loops are not supported in Mergemill Pro, but it is easy to create such effect with a multi-tier setup. We did it in this project. For each issue, there is an index page with a link to each of the articles. On each article page, there is a side bar on the right containing the same index in a smaller font size.
window.onload = writeLinkList;
For the Javascipt update, the system only needs to export the data after 2011, and the Mergemill script in the template generates the links beginning at 2012.