Pregunta

I'm building a boutique website using Kirby (a flat-file CMS) and I'm looking for a way to structure the site for best performance and maintainability.

The website will have multiple categories and under those categories, it will have subcategories. It will only go a max of two levels deep.

Example of current structure:

Categories
    Dresses
        Prom
            Dress-1
            Dress-3
            Dress-4
            Dress-8
        MOB
            Dress-3
            Dress-8
            Dress-9
        Homecoming
            Dress-1
            Dress-10
        Quincenera
            Dress-2
            Dress-8
        Party
            Dress-1
            Dress-10
            Dress-8

    Jewelry

    Accessories

As you can see, some dresses will repeat for different dress categories. Each dress is contained within it's own folder which contains it's images and a text file that has information about the dress such as the title, price, colors, and sizes.

I would like to structure it in such a way that I'll be able to add a dress to multiple categories without slowing down to site (at least not by much) when browsing by category in the frontend. Since I do not have much experience in flat-file systems, I'm asking you for help.

What is the recommended way of structuring this site?

Thank you.

¿Fue útil?

Solución

Don't use folders as tags.

Don't cram it into a tree structure if it isn't a tree.

A dress shouldn't need to live in two folders because it can be worn at different kinds of parties. Each dress should live in one place.

A tagging system might be the way to go.

Kinds of parties might know where to find their list of dresses.

Or dresses might know where to find their list of parties.

Or a list joining both together might exist. In the database world this relationship is called many to many. There we give the relationship it's own table.

You can make this work with flat files but please don't do this to a file system. Symbolic links or gads shortcuts might make it less evil but this isn't sort of problem I'd ask the file system to solve.

Licenciado bajo: CC-BY-SA con atribución
scroll top