module.exports = {
    lang: 'es',
    permalink: function (data) {
        let stem = data.page.filePathStem;

        // handle slug_override
        if (data.slug_override) {
            return `/${data.lang}/${this.slugify(data.slug_override)}/`;
        }

        // handle index pages
        if (stem.endsWith("/index")) {
            return `${stem}.html`; // e.g., /es/index.html
        }

        // default for other pages
        return `${stem}/index.html`; // e.g., /es/about/index.html
    }
};