Migration

Migrating from v1.8 to v2.0

Version 2.0 of Bloggrify introduces a few breaking changes. This guide will help you migrate your existing project to the latest version.

There is two versions of this migration guide:

  • one for general users
  • one for theme developers

For general users

Configuration

Base URL

The url of the website is now configured in the .env file. You have to define the BASE_URL variable in this file, or available in the environment variables.

It replaces the url property in the app.config.ts file.

SITE_INDEXABLE

By default, the whole website is not indexable by search engines. The robots.txt disallows all robots to crawl the website and the sitemap is empty.

You can change this by setting the SITE_INDEXABLE option to true in the .env file.

SITE_INDEXABLE=false

Analytics

It is now possible to add several analytics services to your website by adding them in the analytics property of the app.config.ts file.

Before:

analytics: {
    provider: 'blogtally',
    fathom: {
        code: 'YOUR_CODE'
    }
}

After:

analytics: {
  providers: [ {
    provider: 'blogtally',
    code: 'YOUR_CODE'
  }]
}

The format of the alternate links in the frontmatter of the markdown file has changed.

Before:

---
language: "fr"
alternates:
  - en: "/2025/01/2024-review"
---

After:

---
alternates:
  - hreflang: "en"
    href: "/2025/01/2024-review"
  - hreflang: "fr"
    href: "/fr//2025/01/2024-review"
---

For theme developers

layouts

All layouts have been simplified and needs less props.

default.vue and home.vue layout:

defineProps<{
    doc: unknown;
}>()

archives.vue layout don't need any props. You may use the MinimalistListing component to display the list of articles, or you can create your own component.

tag.vue layout:

defineProps<{
    tag: string;
}>()

and category.vue layout:

defineProps<{
    category: string;
}>()

Both can use the MinimalistListing component to display the list of articles.

Example of tag.vue layout:

<template>
  <MinimalistListing format="list" :tag="tag"/>
</template>