Skip to content

Commit

Permalink
Merge pull request #19 from powdr-labs/update-readme
Browse files Browse the repository at this point in the history
Update readme
  • Loading branch information
kuzdogan authored Sep 29, 2024
2 parents 8f198f1 + 3d0f689 commit fbf62ca
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Powdr Labs Website

## Adding posts

You can write blog posts in Extended Markdown (`.mdx`) format nicely. Create a `.mdx` file under `data/blog`. The file name will be the slug of the post. E.g. if you create `my-blog-post.mdx` the post will be at `powdr.org/blog/my-blog.post.mdx`. Alternatively you can create a folder `/my-blog-post` and add an `my-blog-post/index.mdx`.

Easisest is to check out some examples. See https://tailwind-nextjs-starter-blog.vercel.app/ for example posts. Source code of the posts are [here](https://github.com/timlrx/tailwind-nextjs-starter-blog/tree/main/data/blog).

The part above the `.mdx` file is called a "frontmatter":

```
---
title: Deriving the OLS Estimator
date: '2020-12-21'
draft: false
summary: 'How to derive the OLS Estimator with matrix notation and a tour of math typesetting using markdown with the help of KaTeX.'
layout: PostBanner
bibliography: references-data.bib
authors: ['default', 'sparrowhawk']
images: ['/static/images/canada/mountains.jpg']
---
```

Each post must contain a `title` and a `date`, rest is optional.

Some additional notes about blog posts:

- you can set `draft:true` to see it in your developement environment but not publish it.
- The default author is "Powdr Labs", you can add additional authors in `data/authors` and refer them in `authors` in the frontmatter.
- The default post layout is `PostLayout`. You can see the layouts in directory `layouts/`.
To have a post with a banner image use `layout: PostBanner` and add images (typically only one image) in `images: ['/static/images/canada/mountains.jpg']`. The images should be under the directory `public/static`.

## Installation

```bash
Expand Down

0 comments on commit fbf62ca

Please sign in to comment.