Giter VIP home page Giter VIP logo

ixartz / astro-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
669.0 6.0 291.0 12.6 MB

๐Ÿš€ Astro boilerplate with responsive blog and portfolio template using TypeScript and React styled with Tailwind CSS โšก๏ธ Made with developer experience first: TypeScript + ESLint + Prettier + Husky + Lint-Staged + Commitlint + VSCode

Home Page: https://creativedesignsguru.com/demo/astro-boilerplate/

Astro 26.31% TypeScript 61.71% JavaScript 10.39% Shell 1.59%
boilerplate tailwindcss typescript blog boilerplate-front-end boilerplate-template jamstack react reactjs starter

astro-boilerplate's Introduction

Astro Boilerplate with TypeScript and Tailwind CSS Twitter

๐Ÿš€ Astro Boilerplate is starter code for your blog or portfolio based on Astro with Tailwind CSS 3.0. โšก๏ธ Made with Astro, TypeScript, ESLint, Prettier, Tailwind CSS.

Clone this project and use it to create your own Astro blog. You can check the Astro templates demo.

Sponsors

Sentry Codecov Better Stack React SaaS Boilerplate Next.js
Clerk โ€“ Authentication & User Management for Next.js SQLite Developer Experience Crowdin
Add your logo here

Features

A complete Blog feature:

  • ๐ŸŽˆ Syntax Highlighting
  • ๐Ÿค– SEO friendly with sitemap.xml and robots.txt
  • โš™๏ธ RSS feed
  • ๐Ÿ“– Pagination
  • ๐ŸŒˆ Include a dark blog theme
  • โฌ‡๏ธ Markdown
  • ๐Ÿ“ฆ Image lazy loading
  • ๐Ÿ’Ž Responsive design

Developer experience first:

  • ๐Ÿ”ฅ Astro
  • ๐ŸŽจ Tailwind CSS with aspect ratio and typography plugin
  • ๐ŸŽ‰ TypeScript
  • โœ๏ธ ESLint compatible with .astro files
  • ๐Ÿ›  Prettier compatible with .astro files
  • ๐ŸฆŠ Husky
  • ๐Ÿšซ lint-staged
  • ๐Ÿšจ Commitlint
  • ๐Ÿ”ง One-click deploy on Netlify (or, manual if you prefer)

ESLint with:

  • Airbnb styled guide
  • TypeScript compatible
  • Astro compatible
  • Automatically remove unused imports
  • Import sorting
  • Tailwind CSS plugin

Philosophy

  • Minimal code
  • SEO-friendly
  • ๐Ÿš€ Production-ready

Requirements

  • Node.js and npm

Optional

While Astro-boilerplate should work with the latest Node version, it has been tested with the versions in .nvmrc & the bottom of package.json. At current writing, that's Node v16.15.1

Getting started

Run the following command on your local environment:

git clone --depth=1 https://github.com/ixartz/Astro-boilerplate
cd my-project-name
npm install

Then, you can run locally in development mode with live reload:

npm run dev

Open http://localhost:4321 with your favorite browser to see your project.

Deploy to production (manual)

You can create an optimized production build with:

npm run build

Now, your blog is ready to be deployed. All generated files are located at dist folder, which you can deploy the folder to any hosting service you prefer.

Deploy to Netlify

Clone this repository on own GitHub account and deploy to Netlify:

Netlify Deploy button

๐Ÿงž 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 clean Remove ./dist folder
npm run lint Run ESLint and report styling error

Contributions

Everyone is welcome to contribute to this project. Feel free to open an issue if you have question or found a bug.

Additional Checks

This README.md was linted with markdownlint

License

Licensed under the MIT License, Copyright ยฉ 2024

Sponsors

Sentry Codecov Better Stack React SaaS Boilerplate Next.js
Clerk โ€“ Authentication & User Management for Next.js SQLite Developer Experience Crowdin
Add your logo here

Made with โ™ฅ by CreativeDesignsGuru Twitter

Sponsor Next JS Boilerplate

astro-boilerplate's People

Contributors

bingalls avatar ixartz avatar izocel avatar javleds avatar khattaksd 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

astro-boilerplate's Issues

Open Projects In new tab

ProjectList opens Link in same page, ideal behavior should be to open link a new tab
tried passing ReactNode into its props but doesn't seems to work. Needs code to be updated.

Inconsistency for trailing slash in links from BlogGallery and ProjectList

There is an inconsistent behaviour in links to posts:
From the ProjectList the links have a trailing slash, e.g. /posts/my-post/
in links from BlogGallery there is none, e.g. /posts/my-post

On production I need a trailing slash in all links.
So in astro.config.mjs I had to set
trailingSlash: 'always'
and it worked.

And I had to append the trailing slash in the NavBar links, e.g.
<NavMenuItem href="/posts/">Blog Posts</NavMenuItem>

Crashing on Heroku

Hi,

It is crashing.

Heroku log:

2022-05-31T14:27:15.071913+00:00 app[web.1]: at ESMLoader.resolve (node:internal/modules/esm/loader:580:30)
2022-05-31T14:27:15.071913+00:00 app[web.1]: at ESMLoader.getModuleJob (node:internal/modules/esm/loader:294:18)
2022-05-31T14:27:15.071914+00:00 app[web.1]: at ModuleWrap. (node:internal/modules/esm/module_job:80:40)
2022-05-31T14:27:15.071914+00:00 app[web.1]: at link (node:internal/modules/esm/module_job:78:36) {
2022-05-31T14:27:15.071914+00:00 app[web.1]: code: 'ERR_MODULE_NOT_FOUND'
2022-05-31T14:27:15.071915+00:00 app[web.1]: }
2022-05-31T14:27:15.202525+00:00 heroku[web.1]: Process exited with status 1
2022-05-31T14:27:15.246512+00:00 heroku[web.1]: State changed from starting to crashed
2022-05-31T14:27:16.471684+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=png-blog.herokuapp.com request_id=ce919adb-5fdf-4ee1-a3ad-c688de24a158 fwd="3.141.28.136" dyno= connect= service= status=503 bytes= protocol=https
2022-05-31T14:27:16.750784+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=png-blog.herokuapp.com request_id=e6b9cc6e-3707-4e14-8147-55418567e3d0 fwd="3.141.28.136" dyno= connect= service= status=503 bytes= protocol=https
2022-05-31T14:29:07.775284+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=png-blog.herokuapp.com request_id=e9071cf0-87e9-4a56-9d23-60ea56aa3141 fwd="3.141.28.136" dyno= connect= service= status=503 bytes= protocol=https
2022-05-31T14:29:07.524376+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=png-blog.herokuapp.com request_id=9ec3b380-a478-4560-8782-6fb4c9d77ae3 fwd="3.141.28.136" dyno= connect= service= status=503 bytes= protocol=https
2022-05-31T14:33:49.384151+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/robots.txt" host=png-blog.herokuapp.com request_id=a25df73e-6367-40c6-b324-72a534e39271 fwd="94.130.167.87" dyno= connect= service= status=503 bytes= protocol=http
2022-05-31T14:33:50.597249+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=png-blog.herokuapp.com request_id=95a43440-0cfb-4211-8be6-4152f85fa8e8 fwd="94.130.167.87" dyno= connect= service= status=503 bytes= protocol=http

Design not completely fluid and no option to add styles to components

  1. Adding extra Categories Tags breaks the UI fluidity on mobile apps.
  2. Hero banner Avatar looks fine with provided image but its breaking other images that do not have transparent padding by default.

Also components do not take any style props or it could have been fixed by adding the right css style.

image

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.

Images are not displayed when deploying to GitHub Pages through Actions

I'm using the official Astro workflow for GitHub Action.
Build and deployment jobs are both completed with no errors.

When accessing the deployed page no images are displayed, and in the browser console a 404 error is logged for each of them.

Images not loading:
Screenshot 2023-12-27 214425

Errors in browser console:
Screenshot 2023-12-27 214557

Input File Missing

Helo,

When i run npm run build, i got this error

D:\Landing\Astro-boilerplate>npm run build

> [email protected] build
> astro build

08:35:27 PM [build] Collecting build information...
08:35:37 PM [build] src/pages/index.astro is taking a bit longer to import. This is common for larger "Astro.glob(...)" or "import.meta.globEager(...)" calls, for instance. Hang tight!
08:35:41 PM [build] Completed in 14.50s.

 building client
vite v2.9.12 building for production...
โœ“ 23 modules transformed.
dist/entry.663e93a5.js   138.21 KiB / gzip: 44.18 KiB
Completed in 2.31s.

08:35:43 PM [build] Building entrypoints for prerendering...
08:35:47 PM [build] Completed in 3.81s.

 generating static routes
โ–ถ src/pages/index.astro
  โ””โ”€ /index.html (+92ms)
ฮป src/pages/rss.xml.ts
  โ””โ”€ /rss.xml/index.html (+18ms)
โ–ถ src/pages/posts/hello-world.md
  โ””โ”€ /posts/hello-world/index.html (+19ms)
โ–ถ src/pages/posts/second-post.md
  โ””โ”€ /posts/second-post/index.html (+14ms)
โ–ถ src/pages/posts/fifth-post.md
  โ””โ”€ /posts/fifth-post/index.html (+16ms)
โ–ถ src/pages/posts/first-post.md
  โ””โ”€ /posts/first-post/index.html (+11ms)
โ–ถ src/pages/posts/forth-post.md
  โ””โ”€ /posts/forth-post/index.html (+11ms)
โ–ถ src/pages/posts/sixth-post.md
 error   Input file is missing

please help.

Thanks

Problem running template

I ran the following commands:

git clone --depth=1 https://github.com/ixartz/Astro-boilerplate
cd Astro-boilerplate
npm install
npm run dev

I'm receiving this error:

> [email protected] dev /home/fernando/Documents/Empresa/Dev/Astro-boilerplate
> astro dev

(node:44380) UnhandledPromiseRejectionWarning: Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'react-dom' imported from /home/fernando/Documents/Empresa/Dev/Astro-boilerplate/node_modules/@astrojs/react/dist/index.js
    at new NodeError (internal/errors.js:322:7)
    at packageResolve (internal/modules/esm/resolve.js:732:9)
    at moduleResolve (internal/modules/esm/resolve.js:773:18)
    at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:887:11)
    at Loader.resolve (internal/modules/esm/loader.js:89:40)
    at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)
    at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:76:40)
    at link (internal/modules/esm/module_job.js:75:36)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:44380) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:44380) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

image
image

New route gives error

I want to add another page, projects. I added it in /src/pages, and inside added a directory pages, with a file [...page].astro. It seems if I create any page that isn't named posts (the one given by the template), I get an eslint error? Why is this?

arsing error: "parserOptions.programs" has been provided for @typescript-eslint/parser.
The file was not found in any of the provided program instance(s): src/pages/projects/[...page].astro
Screenshot 2023-12-30 at 8 58 43 PM

This is the error

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.