Skip to content

alvarp/includecore-astro-blog-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IncludeCore / Astro Starter Kit: Blog

blog

Features:

  • ✅ Backed by IncludeCore
  • ✅ Minimal styling (make it your own!)
  • ✅ 100/100 Lighthouse performance
  • ✅ SEO-friendly with canonical URLs and OpenGraph data
  • ✅ Sitemap support
  • ✅ RSS Feed support

Live demo: includecore-astro-blog-example.vercel.app

🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

├── public/
├── src/
│   ├── components/
│   ├── content/
│   ├── layouts/
│   └── pages/
├── astro.config.mjs
├── README.md
├── package.json
└── tsconfig.json

Astro looks for .astro or .md files in the src/pages/ directory. Each page is exposed as a route based on its file name.

There's nothing special about src/components/, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.

The src/content/ directory contains the base request to the IncludeCore API. You can use this to fetch data from your IncludeCore account.

Any static assets, like images, can be placed in the public/ directory.

IncludeCore Database

This project is designed to work with an IncludeCore database. You can create a new database in your IncludeCore account and use the DATABASE_ID environment variable to connect your Astro project to your IncludeCore database.

Structure your IncludeCore database with the following fields:

  - title (String)
  - body (Rich Text)
  - date (Date)
  - heroimage (Image)

IncludeCore database fields screenshot: IncludeCore database fields screenshot

Environment variables

  • PROJECT_ID - The ID of your IncludeCore project
  • DATABASE_ID - The ID of your IncludeCore database

🧞 Commands

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

Command Action
npm install Installs dependencies
npm run dev Starts local dev server at localhost:4321
npm run build Build your production site to ./dist/
npm run preview Preview your build locally, before deploying
npm run astro ... Run CLI commands like astro add, astro check
npm run astro -- --help Get help using the Astro CLI

👀 Want to learn more?

Check out our documentation or jump into our Discord server.

Credit

This theme is based off of the lovely Bear Blog.

About

Blog example built with IncludeCore & Astro.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published