Skip to content

argotorg/argot.org

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tailwind-nextjs-banner

argot.org

This repo contains the source code for the website argot.org.

Install

  1. Clone the repo

SSH: git clone git@github.com:argotorg/argot.org.git HTTP: git clone https://github.com/argotorg/argot.org.git

  1. Install
yarn

Please note, that if you are using Windows, you may need to run:

$env:PWD = $(Get-Location).Path

Development

First, run the development server:

yarn dev

Open http://localhost:3000 with your browser to see the result.

Edit the layout in app or content in data. With live reloading, the pages auto-updates as you edit them.

Adding blog 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.

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.

Build and Deploy

For a static HTML build run:

$ EXPORT=1 UNOPTIMIZED=1 yarn build

Then, deploy the generated out folder or run npx serve out it locally.

Licence

Based on timlrx/tailwind-nextjs-starter-blog

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published