theapplegates / cactus-work-img

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Astro Theme Cactus logo

Astro Theme Cactus πŸš€πŸŒ΅

Astro Theme Cactus is a simple opinionated starter built with the Astro framework. Use it to create an easy-to-use blog or website.

πŸ’» Live Demo hosted on Netlify

Features

Made with Astro, Typescript, Tailwind CSS & SolidJS

  • Astro Fast πŸš€
  • Accessible, semantic HTML markup
  • Responsive & SEO-friendly
  • Astro ImageTools for optimised images
  • Markdown posts
  • Pagination
  • Theming colour modes with Tailwind and CSS variables
  • Shiki code syntax styling
  • Auto-generated sitemap & robots.txt

Quick start

Create a new repo from this template.

Deploy with Netlify Deploy with Vercel

Commands

Replace pnpm with your choice of npm / yarn

Command Action
pnpm install Installs dependencies
pnpm dev Starts local dev server at localhost:3000
pnpm build Build your production site to ./dist/
pnpm preview Preview your build locally, before deploying

Configure

  • Edit config file src/site-meta.config.ts for basic site meta data
  • Update file astro.config.mjs site property with your own domain
  • Replace & update files within the /public folder:
    • favicon.ico
    • manifest.webmanifest
    • public/images folder
  • Modify file src/styles/global.css with your own light and dark styles
  • Create / edit posts for your blog within src/pages/posts/ with .md file(s)

Adding posts

Adding a post is a simple as adding your .md file to the src/pages/posts/ folder, the name of which will be used as the slug/url. The two posts included with this template can be modified, and give you an example of how to structure your posts. Astro docs also has a detailed section on markdown pages.

Frontmatter

Property (* required) Description
layout This is used to import Markdown Layouts, this theme uses src/layouts/BlogPost.astro as a wrapper for all blog posts.
title * Self explanatory. Used as the text link to the post, the h1 on the posts' page, and the pages' title property
description * Similar to above, used as the seo description property
publishDate * Again pretty simple. To change the date format/locale, currently en-GB, update/pass the locale arg to function getLocaleTime, found in src/util.ts.
tags Tags are optional. Any new tag(s) will be shown in yourdomain.com/posts + yourdomain.com/tags, and generate the page(s) yourdomain.com/tags/[yourTag]

Deploy

Astro docs has a great section and breakdown of how to deploy your own Astro site on various platforms and their idiosyncrasies.

By default the site will be built (see Commands section above) to a /dist directory.

Acknowledgment

This theme is inspired by Hexo Theme Cactus

License

Licensed under the MIT License, Copyright Β© 2022

About

License:MIT License


Languages

Language:Astro 76.1%Language:JavaScript 13.9%Language:TypeScript 7.8%Language:CSS 2.2%