Git Product home page Git Product logo

blogster's Introduction

Blogster - Beautiful, accessible and performant Astroblog templates.


Blogster is a collection of beautiful, accessible and performant blog templates built with Astro and Markdoc.

Blogster is in alpha preview. If you have any feedback, please open a discussion or issue.
Follow me @flexdinesh on Twitter for updates.

Maintenance Status

Blogster was built before Astro released content collections. With content collections, Astro now has first party built in support for strongly typed content schema and Markdoc rendered content which is what Blogster was built for. So Blogster won't receive any updates in the future. I'm going to leave this as a reference for font load strategy, meta tags and a few other best practices for setting up a website.

Demo

Check out the demo for each theme.

Key Features

  • Fast. Fast by default. Astro websites are engineered to be fast and load before you could blink, even when not cached.
  • Dark mode. All themes have light/dark mode built-in.
  • Mobile first. Responsive and loads fast in all devices.
  • Accessible. A well thought out semantic and accessible content.
  • Perfect lighthouse score. 100 across the board.
  • Easy content authoring Author content using markdown (.md) from your code editor or directly in GitHub.
  • Extended markdown with Markdoc. Type-safe custom components like YouTube embed, Twitter embed (or anything you want really) in your markdown (.md) files.
  • Built in RSS feed for you blog, excellent SEO and more.

Get Started

Get started with one simple command.

npx create-blogster@latest --theme sleek

Themes

Blogster comes in a variety of themes. You can easily find one that suits and goes well with your personality. All themes are performant, accessible, SEO friendly, built with the best practices out there and have a lighthouse score of 100 across the board.

Minimal

A light weight theme built with plain old HTML and CSS. No external fonts or icons. Zero JavaScript. You get a full functional nice looking blog that loads super fast.

Check it out here - Blogster minimal template.

npx create-blogster@latest --theme minimal

Sleek

A beautiful, performant and accessible theme built with Tailwind.

Check it out here - Blogster sleek template.

npx create-blogster@latest --theme sleek

Newspaper

A beautiful, performant and accessible theme built with Tailwind.

Check it out here - Blogster newspaper template.

npx create-blogster@latest --theme newspaper

Bubblegum

A beautiful, performant and accessible theme built with Tailwind.

Check it out here - Blogster bubblegum template.

npx create-blogster@latest --theme bubblegum

FAQ

1. Why Markdoc or Why not MDX?

MDX is great but when you use MDX, your MDX content is stored as code within your `.md` files. Markdoc lets you build and use your own custom components (Eg. YouTube embed, Twitter embed, Carousel, etc) within your markdown files with a special syntax. Your content is stored as text without having to leak code (imports or JSX) into your `.md` files. You can build validations, type-safety and all sorts of customisations for your custom components with Markdoc. If you're still not convinced, hear this, you can pass Markdoc content as string (just like any other string) throughout your application, store it in local storage or send it as params over the network. IMHO, Markdoc based content authoring gives you the full flexibility of markdown without the limits of the markdown syntax.

Contributing

  • When you are using cmd+shift+F to search for references across the repo, remember to exclude templates/ dir because templates are auto-generated using a script and only add noise in search results.
  • Whatever you're changing, you will mostly only need to change in themes/ or packages/shared. The themes in templates/ dir is auto-synced using a script so you don't have to make any change in the templates/ dir.

License

MIT ยฉ Dinesh Pandiyan

blogster's People

Contributors

fisher60 avatar flexdinesh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blogster's Issues

Title hover animation seems a bit inconsistent in mobile

Hi @flexdinesh Great theme. Thanks for open sourcing it.

I have a small inconsistency problem with the title animation in mobile.

RPReplay_Final1678091695.MP4

The background gradient doesn't seem to cover the entire text.

Reproducible in
OS: iOS
browser: safari
version : 16.1.1
theme: bubblegum

Happy to submit a PR

option to get date for posts from git commit info

I am looking at migrating from Hugo to Astro, because I am having trouble integrating Hugo with other tools. One feature I'm missing is that with Hugo I do not need to include dates on my posts, but can use the git commit information as part of the page generation to provide the page creation and modification dates. It would be great to have this functionality with Astro as well, but as I understand it, it would be an aspect of the theme? If I should file this feature request somewhere else please let me know.

Cannot build the newspaper demo

$ yarn install
$ yarn build
(node:1009) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1009) ExperimentalWarning: Use `importAttributes` instead of `importAssertions`
(Use `node --trace-warnings ...` to show where the warning was created)
03:42:53 PM [build] output target: static
03:42:53 PM [build] Collecting build info...
03:42:53 PM [build] Completed in 26ms.
03:42:53 PM [build] Building static entrypoints...
03:42:54 PM [build] Completed in 1.17s.

 building client 
Completed in 19ms.


 generating static routes 
(node:1009) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
โ–ถ src/pages/index.astro
  โ””โ”€ /index.html (+14ms)
โ–ถ src/pages/projects.astro
  โ””โ”€ /projects/index.html (+7ms)
ฮป src/pages/rss.xml.ts
  โ””โ”€ /rss.xml (+11ms)
โ–ถ src/pages/blog/[slug].astro
 error   require is not defined
ReferenceError: require is not defined
    at file:///Users/tison/Brittani/nightsky-newspaper/dist/entry.mjs?time=1711957374648:16921:3
    at handleId (file:///Users/tison/Brittani/nightsky-newspaper/dist/entry.mjs?time=1711957374648:16696:14)
    at loadComponentsInOrder (file:///Users/tison/Brittani/nightsky-newspaper/dist/entry.mjs?time=1711957374648:16718:5)
    at Object.load (file:///Users/tison/Brittani/nightsky-newspaper/dist/entry.mjs?time=1711957374648:16864:13)
    at loadLanguages (file:///Users/tison/Brittani/nightsky-newspaper/dist/entry.mjs?time=1711957374648:16910:45)
    at ensureLoaded (file:///Users/tison/Brittani/nightsky-newspaper/dist/entry.mjs?time=1711957374648:17080:7)
    at runHighlighterWithAstro (file:///Users/tison/Brittani/nightsky-newspaper/dist/entry.mjs?time=1711957374648:17089:5)
    at AstroComponentInstance.factory (file:///Users/tison/Brittani/nightsky-newspaper/dist/entry.mjs?time=1711957374648:17108:35)
    at AstroComponentInstance.init (file:///Users/tison/Brittani/nightsky-newspaper/dist/entry.mjs?time=1711957374648:838:29)
    at AstroComponentInstance.render (file:///Users/tison/Brittani/nightsky-newspaper/dist/entry.mjs?time=1711957374648:843:18)

Hot reload markdown content

Hi I'm very new to astro and was wondering if there's a way to get the markdown content itself to hot reload. The astro templates do hot reload when editing directly but not the blog content which I have to do a pge refresh to see. I'd love to edit the content with realtime updates to see how it would look like on prod instead of in my editor built in markdown preview tool (github styled)

fetch failed

Hello everyone, I have a problem when i try to install tamplate
image

Like buttons plugin

Hi, I created an astro plugin which allows to add Like buttons to blog posts.
Are you open to integrate it in your template? I can create a PR to setup the integration. It will be just a few line of code. I will make the integration optional, meaning that if the setting_key is missing (the user doesn't want to use the plugin), nothing is affected and will change.

In general, the plugin allows to receive any kind of feedback, but I think for a blogsite likes are more appropriate. Nonetheless, it's very easy and customizable.

Let me know.
Thanks.

require is not defined

How to reproduce:

  1. run npx create-blogster@latest --theme sleek
  2. run cd my-blogster-blog
  3. run yarn run dev --host
  4. visit http://127.0.0.1:3000/blog/basic-markdown-style-guide

The page displays an error message:

require is not defined

/my-blogster-blog/.yarn/cache/prismjs-npm-1.29.0-6faa5b04b8-007a8869d4.zip/node_modules/prismjs/components/index.js:1:33

> 1 | const components = require('../components.js');
    |                                 ^
  2 | const getLoader = require('../dependencies');

ReferenceError: require is not defined
    at /.yarn/cache/prismjs-npm-1.29.0-6faa5b04b8-007a8869d4.zip/node_modules/prismjs/components/index.js:1:33
    at instantiateModule (file:///my-blogster-blog/.yarn/__virtual__/vite-virtual-2b0880e296/0/cache/vite-npm-3.2.5-f23b9ecb5b-ad35b7008c.zip/node_modules/vite/dist/node/chunks/dep-5605cfa4.js:53364:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5

Other information:

  • platform: MacOS
  • yarn 3.3.0
  • node 18.12.1

Cannot read properties of undefined (reading 'postcss')

Right after generating my Bubblegum site, I built it, only to get this error:

 error   Cannot read properties of undefined (reading 'postcss')
  File:
    D:\personal-site-astro\node_modules\@astrojs\tailwind\dist\index.js:78:22
  Code:
    77 |         const tailwindConfig = (userConfig == null ? void 0 : userConfig.value) ?? getDefaultTailwindConfig(config.srcDir);
    > 78 |         config.style.postcss.plugins.push(tailwindPlugin(tailwindConfig));
         |                      ^
      79 |         config.style.postcss.plugins.push(autoprefixerPlugin);
      80 |         if (applyBaseStyles) {
      81 |           injectScript("page-ssr", `import '@astrojs/tailwind/base.css';`);
  Stacktrace:
TypeError: Cannot read properties of undefined (reading 'postcss')
    at Object.astro:config:setup (file:///D:/personal-site-astro/node_modules/@astrojs/tailwind/dist/index.js:78:22)
    at async withTakingALongTimeMsg (file:///C:/Users/mikwee/AppData/Local/Yarn/Data/global/node_modules/astro/dist/integrations/index.js:15:18)
    at async runHookConfigSetup (file:///C:/Users/mikwee/AppData/Local/Yarn/Data/global/node_modules/astro/dist/integrations/index.js:69:7)
    at async AstroBuilder.setup (file:///C:/Users/mikwee/AppData/Local/Yarn/Data/global/node_modules/astro/dist/core/build/index.js:40:21)
    at async AstroBuilder.run (file:///C:/Users/mikwee/AppData/Local/Yarn/Data/global/node_modules/astro/dist/core/build/index.js:130:23)
    at async build (file:///C:/Users/mikwee/AppData/Local/Yarn/Data/global/node_modules/astro/dist/core/build/index.js:21:3)
    at async runCommand (file:///C:/Users/mikwee/AppData/Local/Yarn/Data/global/node_modules/astro/dist/cli/index.js:157:14)
    at async cli (file:///C:/Users/mikwee/AppData/Local/Yarn/Data/global/node_modules/astro/dist/cli/index.js:180:5)

Does anybody have an idea of what's going on? Thanks.

Implementation of a search functionality

The theme is actually complete in itself, but just lacks the search functionality. When the user creates a large amount of blogs, searching for the right one will be really hard. A search functionality can be really helpful for searching through the blogs. You might consider adding this, or can tell how to implement this in the website.

Markdown from content/* not found on Windows due to globby path

Summary

When on Windows and creating a project with the command npx create-blogster@latest --theme sleek, no content is displayed on either /blog or /projects. This seems to be an issue with globby trying to understand the result of path.join

Steps To Reproduce

  1. On Windows create a new project using npx create-blogster@latest --theme sleek
  2. run yarn dev and view the live dev site in the browser at the given url
  3. Website is up and running as normal, but all content is missing

Expected Outcome

Content should be displayed properly regardless of platform

Suggested Solution

Globby documentation states that path.posix must be explicitly used for all globby paths, windows paths will not work. path.join will use path.win32 when on a Windows platform and therefore must be hard-coded to utilize path.posix when using globby.

Support formatted RSS content out of the box

I'd love to see content added to the RSS feed. In particular, I'd want to see the custom blogster components supported in that.

Right now, I'm just returning Markdoc.renderers.html(postContent) as content on the RSS feed. It's mostly fine but custom components like CodeBlock and YouTubeEmbed aren't rendered as normal html. It would be nice to have that supported out of the box.

Can I remake the Blogster Newspaper theme on a newer Astro version?

Hey, I really liked your Blogster Newspaper theme, and I was wondering if I had permission from you to remake it with newer Astro features like Markdoc integration and Content Collections? I'll credit you in the README, of course. I'll also publish it under a different name (I was thinking Journal).

Dark mode flicker in Chrome

I've noticed that in Chrome (macOS 109.0.5414.87) there is a flickering when navigating between pages only for the production build. In dev mode this doesn't seem to occur nor does it occur in Safari for the production build.

Here's a video showing the issue:

Screen.Recording.2023-01-23.at.11.24.26.pm.mov

TODO list

List of things in pipeline for Blogster. I'll smash through them as and when I find time.

All themes:

  • Markdoc custom component - Image with caption
  • theme-color meta - set in ThemeScript.astro and update during theme toggle
  • DarkMode.astro - convert to web component
  • GitHubGist.astro - convert to web component
  • Nav.astro - copy from Bubblegum to all themes and convert to web component
  • blog/projects page - align items baseline b/w title and date
  • fontawesome - add RSS icon to bareminimum
  • Add code comment for favicon on how it's generated
  • Add code comment for Tailwind css variables and how they work
  • FIX: OG image URL for blog posts
  • Frontmatter schema - refactor reused types

Bubblegum:

  • Remove heading before border for h3 and higher

Sleek:

  • Remove 50-900 shades and replace with one or two. It's an overkill.

Newspaper:

  • Remove 50-900 shades and replace with one or two. It's an overkill.
  • Rethink: content heading after border is not semantically correct

codepen showing wrong Link

Hi,

Environment

using Demo: Newspaper
using the template via Astro

What's the issue?

I'm using this template for my personal blog, And I realised that by just setting url and title in the .md file, the correct codepen link will not appear

How to reproduce

If you just wanted to change the line in the default articles, you won't see the new link by changing url and title.

{% codepen url="https://codepen.io/ruphaa/pen/eYJqjgq" title="Ecosystem - Pen in CSS by Ruphaa" /%}

Notes

according to the embedded link retried from codepen there are two other important fields which are data_slug_hash and data_user. and these two are hardcoded in the template.

Tailwind CSS doesn't work on build

In the dev server everything works fine, but when I build the website, Tailwind CSS's styles aren't baked into the HTML, which means my site ends up with no styling. Why is that? Thanks.

custom markdoc component for footnotes

It appears that this theme does not implement markdoc the same way that I would get if I ran

npx astro add markdoc

in a generic astro project, and that as a result some of the documentation at the Astro doesn't fully apply. As the todo list is locked, I cannot comment there. I'm trying to follow the advice given at
#70 to add footnote support, as that is not supported in the upstream Markdoc. I suspect that would be useful to more than just me, and might be something you want to consider for inclusion in the theme if it can be made to work.

Please ignore or delete issue made by mistake for another repo

Error

just finished setting up through the video and reading documentation however Mason.confi gave me this error :
server "sumneko_lua" is not valid entry in ensure installed. makesure to only provid lspconfig server names

Finding

sumneko_lua just deprecated the name and change it to lua_ls

Issue

'vim' global undefined appearing everywhere there is vim in .lua files so is this not working?

lsp.configure('lua-ls', {
    settings = {
        Lua = {
            diagnostics = {
                globals = { 'vim' }
            }
        }
    }
})

Add tags to classify posts

Hello ๐Ÿ‘‹๐Ÿป ,

First of all congratulations for developing this template, is my favorite by far on astro!
As an idea it would be perfect to filter blog posts by tags as astro-paper template does.

Regards

Add support for custom package manager.

I really like this theme, It's a great work! But I have a little suggestion.

I initialize my repo by npm init -y, but when I finished npx create-blogster@latest --theme sleek, it shows help information below:

Start your development with:

    - cd my-blogster-blog
    - yarn dev

Do you think add detection of package is a worth doing for? Maybe support of pnpm can speed up initialization.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.