1

We want to create a website quite similar to a blog.

We have a JSON file containing our data:

[{
  "name": "Anna",
  "age": 15,
  "tags": ["nice", "friendly"]
}, {
  "name": "Max",
  "age": 24,
  "tags": ["handsome"]
}
...
]

We want to have these different pages:

  • / index page + search
  • /users list users + pagination
  • /users/:slug details about users
  • /tags list all tags
  • /tags/:tag list all users with this tag

We would like to use a static site tool to generate the different pages. We tried hugo and 11ty. Hugo is not able to create pages from a JSON file. 11ty is but has a few limitations (e.g. Collections can't really get parsed). Does anyone know a good framework for creating a static website with JSON? Or has any other recommendation with which technology we should build this project.

We want that the website is:

  • Fast (no calculation on each request) + very fast on first load
  • SEO friendly
3
  • if you cannot find a framework that match your requirement, the best option is to build your own. I believe you can mix Python, Bottle, and Jinja to get what you want. See youtube.com/watch?v=9v6kDoUjIs4 and bottlepy.org/docs/dev Feb 28 at 9:22
  • Are those JSON files fixed? They're probably your most important constraint right now if you want to use a prebuilt program that can read those. Most likely you'll need to develop your own or change your data formats to something friendly to existing blog engines.
    – Alejandro
    Mar 2 at 14:49
  • @Alejandro Thanks for your comment. Yes this is currently our plan. We transform the JSON into .md files with normal front matter syntax. With this we can use all features of static site generators. The in-built support from 11ty has just a limited set of features when you use JSON data directly. Mar 4 at 0:47

1 Answer 1

0

One option is couchDB.

It has tools to store, filter, map, reduce, and sort JSON data. It also has tools to combine and convert to HTML.

It does not offer some of the functionality of some DBs, so you need to know how to validate input, how to do ACID, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.