astro-theme-cody

Author: kirontoo on November 16, 2024

BlogTailwindDarki18nRSSSEO
astro-theme-cody
astro-theme-codyastro-theme-codyastro-theme-codyastro-theme-codyastro-theme-cody
Free
MIT

Contributors Forks Stargazers Issues MIT License Netlify Status

Astro Theme Cody

A minimalist blog theme built with Astro. A quick and easy starter build for anyone who wants to start their own blog.

View Demo ยท Report Bug ยท Request Feature

demo-preview

Table of Contents

Motivation

Although there are already so many blog themes out there, I wanted one that would give off that terminal/dev vibe and a few features that other themes did not have.

Key Features:

Demo

Check out the demo here.

Quick Start

Create a new repo from this template.

# npm 7+
npm create astro@latest -- --template kirontoo/astro-theme-cody

# pnpm
pnpm dlx create-astro --template kirontoo/astro-theme-cody

(back to top)

Commands

All commands are run from the root of the project, from a terminal:

CommandAction
pnpm installInstalls dependencies
pnpm run devStarts local dev server at localhost:4321
pnpm run buildBuild your production site to ./dist/
pnpm run previewPreview your build locally, before deploying
pnpm run astro ...Run CLI commands like astro add, astro check
pnpm run astro -- --helpGet help using the Astro CLI

(back to top)

Configuring Your Website

Your site config, social media links and Navbar links are all placed within src/consts.ts. There you can configure your site default title, description, language, profile, social media links and visible nav bar links.

Adding Posts and Projects

This theme utilises Content Collections to organise Markdown and/or MDX files, as well as type-checking frontmatter with a schema -> src/content/config.ts.

You can find examples of blog posts in src/content/blog and examples of projects in src/content/project.

Blog post frontmatter

Property (* = required)Description
title *Title of your post. Limited to a maximum of 150 characters
description *Short description of your post, which will also be used for SEO. Has a max length of 250 characters.
pubDate *Published date
updateDateOptional date representing when the post has been updated. Note that this date will be used instead of the published date to order posts when available.
heroImageOptional cover image for you post. Include both a src and a alt property. Check src/content/blog/first-post.md for an example.
ogImageOptional image used for SEO.
tagsUse optional tags to organize your posts into categories or topics. All tags will be shown in yourdomain.com/tags.
seriesUse optional series to organize your posts into a series of posts. All series will be shown in yourdomain.com/series.
draftOptional boolean. Removes posts from being published.
orderOptional number value from 1 - 5 to pin certain posts to the top. Limited to only 5 pinned posts
hideOptional boolean. Hide a post on /blog page. Will still show up in /archive

Project frontmatter

Property (* = required)Description
title *Title of your project. Limited to a maximum of 150 characters
description *Short description of your project, which will also be used for SEO.
pubDate *Published date
heroImageOptional cover image for you project. Include both a src and a alt property. Check src/pages/projects/project-1.md for an example.
ogImageOptional image used for SEO.
stack *A list of technologies your project used which will be rendered as icons. This theme uses the SVG Logos librar, you can use icones.js.org to find the icons you need.
platformLink to website or demo
websiteLink to website or demo
githubYour github repo link
draftOptional boolean. Removes projects from being published.
orderOptional number value from 1 - 5 to pin certain projects to the top. Limited to only 5 pinned posts

(back to top)

Multi-Language Support

See the wiki to set up multi-language support for your blog.

Deploy

Astro provides great documentation for deploying your Astro websites on various platforms. You can find it here.

Extra Funtionality

Check out Astro Recipes to add other functionality like a RSS feed.

Credit

This theme is based off of the theme Astro Cactus and Hugo Risotto.

(back to top)