npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

create-astro-starter

v0.13.4

Published

Astro starter template with tailwind, alpinejs, localization, blog, CMS, and comments

Downloads

116

Readme

Astro Starter Kit

Open in StackBlitz Open with CodeSandbox Open in GitHub Codespaces

Features:

  • ✅ Tailwind CSS
  • ✅ Alpine js
  • ✅ Typescript
  • ✅ Localization (with astro-i18n-aut)
  • ✅ Dark/light mode
  • ✅ Blog
  • ✅ Discussions (thanks to giscus)
  • ✅ CMS for editing blog post (thanks to decap CMS)
  • ✅ Sitemap (localized)
  • ✅ RSS (localized)
  • ❌ PWA (Follow tutorial below to add it)

🧞 Commands

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

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

If you want to switch to npm make sure to remove pnpm-lock.yaml and node_modules folder and then run npm install

How to add PWA

TBD

🚀 Project Structure

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

├── public/
├── src/
│   ├── components/
│   ├── content/
│   ├── layouts/
│   ├── locales/
│   ├── middleware/
│   ├── pages/
│   ├── styles/
│   ├── utils/
│   └── consts.ts/
├── astro.config.mjs
├── README.md
├── package.json
├── .prettierrc
├── tailwind.config.cjs
└── 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 "collections" of related Markdown and MDX documents. Use getCollection() to retrieve posts from src/content/blog/, and type-check your frontmatter using an optional schema. See Astro's Content Collections docs to learn more.

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

✍️ Admin dashboard

You can access the admin dashboard for editing blog post at /admin (https://example.com/admin)

For more information follow Decap CMS documentation at https://decapcms.org/docs/

In order to access the admin dashboard to change blog articles content you need to have access to the github repo, a quick way to test it test would be fork the repo and than configure decap cms accordingly to your cloud provider (netlify, cloudflare, vercel, etc...).

If you use cloudflare pages you can follow this guide https://github.com/i40west/netlify-cms-cloudflare-pages.

In this case your environment variable should look like this

Cloudflare environment variable image

If you use netlify it's actually easier, you will need to change in the file astro.config.mjs NetlifyCMS config config.backend.name to git-gateway. (See https://decapcms.org/docs/git-gateway-backend/#git-gateway-with-netlify for more info)

👀 Want to learn more?

Check out Astro documentation or jump into Astro Discord server.