An open API service indexing awesome lists of open source software.

https://github.com/swetrix/blog-posts

Swetrix Analytics blog posts
https://github.com/swetrix/blog-posts

Last synced: 5 months ago
JSON representation

Swetrix Analytics blog posts

Awesome Lists containing this project

README

          




This repository contains blog posts for [Swetrix](https://swetrix.com).

## Development

### Code Formatting

This project uses [Prettier](https://prettier.io/) to ensure consistent formatting of Markdown files.

#### Available Scripts

- `npm run format` - Format all Markdown files
- `npm run format:check` - Check if files need formatting (without making changes)

## Syntax

Blog posts follow the regular markdown syntax, with the following additional features.

### Metadata

Every blog post must contain a metadata block at the beginning of the file.

```markdown
---
title: 'Title of the blog post'
intro: 'Intro of the blog post' (optional)
date: November 28, 2025 (optional)
hidden: false (true/false) - if true, the post will not be visible on the /blog page, but is still accessible at the direct URL
standalone: true (true/false) - if true, the post will be displayed as a standalone page, without the /blog prefix
author: Author name (optional)
twitter_handle: Author Twitter handle (optional; without the @ prefix)
---
```

### UI Components

You can include UI components in your blog posts. They follow the syntax of `::COMPONENT_NAME::`.

Available components:

- `::TABLE_OF_CONTENTS::` - autogenerated table of contents for the blog post based on the headings in the post.
- `::CTA:TIME_TO_SWITCH::` - a CTA section to switch to Swetrix from other analytics tools.
- `::CTA:TIME_TO_DITCH_GOOGLE::` - a CTA section to ditch Google Analytics and switch to Swetrix.
- `::SWETRIX_LOGO::` - a Swetrix logo, font size inherited from the surrounding text.

### Emojis

`✅`, `⚠️` and `❌` emojis are replaced with proper SVG entities on render.