• Stars
    star
    582
  • Rank 76,801 (Top 2 %)
  • Language Astro
  • License
    GNU General Publi...
  • Created over 1 year ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ“š Openblog is an elegant, simple, and user-friendly blog. Focused on accessibility, SEO and performance.
Screenshot

โญ Leave a star if you like this project! โญ๏ธ

Deploy with Vercel Deploy to Netlify

๐Ÿ“Œ Table Of Contents

  1. Demo
  2. CMS
  3. Features
  4. Roadmap
  5. Stack
  6. Running locally
  7. Configure
  8. Categories
  9. Posts
  10. Draft
  11. FrontMatter
  12. CLI
  13. Contributors

๐Ÿ’ป Demo

Check out the Demo, hosted on Vercel

demo.mp4

๐Ÿฆ™ Tina CMS

By default, this template comes pre-configured with Tina CMS.

Now you can create your posts directly from the CMS without the need to do it manually.

If you decide to use Tina, it's not necessary to add any properties to the Markdown files, Tina does it automatically.

Example:

tina.mp4

The documentation for Tina CMS can be found here

Tina is completely optional, and you can remove it, and it will still function in the same way.

๐Ÿ’ช Features:

openblog Lighthouse Score

  • โœ… Minimal styling
  • โœ… Mobile responsive
  • โœ… 100/100 Lighthouse performance
  • โœ… SEO-friendly with canonical URLs and OpenGraph data
  • โœ… Sitemap support
  • โœ… RSS Feed support
  • โœ… Markdown & MDX support
  • โœ… Syntax highlighting
  • โœ… Image optimization
  • โœ… Table of contents
  • โœ… Dark mode
  • โœ… Reading Time
  • โœ… Pagefind static search library integration
  • โœ… Related posts
  • โœ… Share posts (Linkedin, twitter)
  • โœ… Draft mode
  • โœ… Copy code block
  • โœ… CMS in the repository (Tina CMS)
  • โœ… Pagination
  • โœ… ViewTransition (new)

๐Ÿ›ฃ๏ธ Roadmap

  • โŒ Add post author
  • โŒ Add customization with colors
  • โŒ Add filters for reading time, date...
  • โŒ More sharing options
  • โŒ Internationalization (i18n)

โš™๏ธ Stack

๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Running Locally

Recommended extensions for VSCode:

  1. Clone or fork the repository:
[email protected]:danielcgilibert/blog-template.git
  1. Install dependencies:
pnpm install
  1. Run the development server:
pnpm dev

๐Ÿ“ Configure

  • Edit the configuration file src/data/site.config.ts for the basic blog metadata.
  • Update the astro.config.mjs file at the root of the project with your own domain.
  • Modify the files in the /public folder:
    • favicon
    • robots.txt -> update the Sitemap url to your own domain
    • open-graph -> the open-graph is the image that will be displayed when sharing the blog link. For posts, the preview image is the post cover.
  • Edit the social networks in the Header component - src/components/Header.astro, change the URL to your social network.

๐Ÿ—‚๏ธ Adding a category

To add a new category to your blog, simply go to the src/data/categories.ts file and add it to the array.

Example:

export  const  CATEGORIES  =  [
'JavaScript',
'React',
'new category here'  <---
]  as  const

๐Ÿšจ Zod checks whether the category is not correctly written or does not exist in the properties of the markdown document. It will throw an error when building the application. ๐Ÿšจ

๐Ÿ“„ Adding a post

Adding a post is as simple as adding a .md or .mdx file to the blog folder at the path src/content/blog. The filename will be used to create the slug/URL of the page.

For example, if you have a file named jsx-and-react.md, it will be transformed into: http://yourdomain.com/post/jsx-and-react/

๐Ÿ“ Activating draft mode

To activate draft mode, add the property draft: true to the file, and it will no longer be displayed on the blog.

Example :

title: MacBook Pro 2022
description: 'The new MacBook Pro 2022 is here. With the Apple M2 chip, a new design, and more, the new MacBook Pro is the best laptop Apple has ever made.'
pubDate: 'Jul 02 2022'
heroImage: '../../assets/bg.jpg'
category: 'Category 1'
tags: ['JavaScript', 'css', 'HTML5', 'GitHub']
draft: true <---

โšก๏ธ Frontmatter

Required properties:

  • Title
  • Description
  • pubDate
  • heroImage (post cover)
  • category (Choose a category from src/data/categories.ts)

Optional properties:

  • draft (no need to include it, by default it's false)
  • tags

The schema for posts is located at src/content/config.ts. You can modify any parameter, for example, by adding a maximum of 80 characters for titles: title: z.string().max(80). For more information, refer to the zod documentation.

๐Ÿงž Commands

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

Command Action
pnpm install Installs dependencies
pnpm run dev Starts local dev server at localhost:3000
pnpm run build Build your production site to ./dist/
pnpm run preview Preview your build locally, before deploying
pnpm run format:check Check code format with Prettier
pnpm run format Format codes with Prettier
pnpm run sync Generates TypeScript types for all Astro modules. Learn more.
pnpm run lint Lint with ESLint

๐Ÿ‘‹ Contributors

More Repositories

1

Website

๐Ÿ“ฅ Projects, Blog, Snippets, Resources.
Astro
6
star
2

OpenLink

๐Ÿ”— Minimalist App for your links.
TypeScript
6
star
3

portfolio

๐Ÿ‘จโ€๐Ÿ’ป My portfolio.
JavaScript
4
star
4

Jira-Clone

๐Ÿ“„ Jira-Clone with NextJS and MaterialUI.
TypeScript
4
star
5

DevBird

๐Ÿค
TypeScript
4
star
6

Filmoteca

๐ŸŽฌ Movie application with calls to different APIs, built with firebase and react.
JavaScript
3
star
7

portfolio-astro

โ˜„๏ธ Portfolio with Astro
Astro
3
star
8

challenges-FrontendMentor

๐Ÿ’ช Project with challenges from frontendmentor.io
JavaScript
2
star
9

ShopPHP

PHP
1
star
10

pokeApi

JavaScript
1
star
11

react-Portfolio

JavaScript
1
star
12

cakePHP-Restaurante

PHP
1
star
13

gatsby-web

JavaScript
1
star
14

mis-custom-hooks

โš›๏ธ Repositorio con varios custom hooks creados
JavaScript
1
star
15

PostIt

TypeScript
1
star
16

instaclone

Copia de la aplicaciรณn de instagram con GraphQL, Apollo Server, MongoDB y ReactJS
JavaScript
1
star
17

Antiguo-Portfolio

Portfolio creado con NextJS y TailwindCSS
JavaScript
1
star
18

Challenges-adventJS

JavaScript
1
star
19

NotasJS

JavaScript
1
star
20

React-gifApp

JavaScript
1
star
21

nodeDocker

Pruebas con la API de dockerode
JavaScript
1
star
22

astro-fast-start

A starter for Astro that includes auth, db, tailwind ๐Ÿ”ฅ
TypeScript
1
star
23

Fiber-Landing-Page

๐Ÿ“Š Codewell Challenge
HTML
1
star
24

panelAdminDocker

JavaScript
1
star
25

danielcgilibert

Config files for my GitHub profile.
1
star
26

OMDb-API-Films

๐ŸŽฅ React application with OMDB API calls
CSS
1
star
27

proyectoTPV

Proyecto centrado en la gestiรณn de un restaurante.
PHP
1
star
28

CalendarApp

๐Ÿ“… Calendar application with React
JavaScript
1
star
29

minimal-photography

๐Ÿ“ธ Minimalist website for photographers
Astro
1
star