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
- Host: GitHub
- URL: https://github.com/swetrix/blog-posts
- Owner: Swetrix
- Created: 2023-10-07T19:58:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-17T23:00:44.000Z (almost 2 years ago)
- Last Synced: 2025-02-09T03:27:43.047Z (over 1 year ago)
- Size: 76.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.