Skip to content

πŸ“¦οΈ This repository that contains an Astro template ready for any website you can imagine. It's like a Swiss Army knife for developers, offering pre-built modules and flexible configurations to kickstart your project, regardless of its type.

TheElegantCoding/astro_template_webpage

Repository files navigation

edge


πŸ“¦οΈ Astro template webpage


πŸ“¦ SETUP β€’ βš™οΈ CONFIGURATION β€’ οΈοΈοΈπŸ›°οΈ FEATURES

πŸ“ About

Tired of sluggish websites and SEO headaches? Unleash the power of lightning-fast performance and built-in optimization with this Astro template builder! Crafted for developers who value speed and simplicity, this robust toolkit empowers you to build stunning websites that soar in search engines and captivate users.

Ditch the struggle and focus on what matters most - crafting impactful content that drives engagement. Welcome to the future of web development - where SEO and performance work hand-in-hand.

(⬆️ back to top)


πŸ“š Table of content


πŸ›°οΈ Features

  • 🌌 Astro - Astro Framework
  • 🦾 Typescript - Extremely strict type checking
    • βœ… Absolute imports - No more bad imports
  • πŸ’Ž Sass - Css framework for ui development
    • βœ… BEMIT - Arquitecture for sass
    • βœ… Mobile firts - Best performance for css
    • βœ… Reset - Reset css for match style between browsers
    • βœ… Join media queries - Join media queries for small file size
    • βœ… Vendor prefixes - Vendor prefixes for all support
    • βœ… Remove unused css - Remove unused css in build
  • πŸ—οΈ Clean arquitecture - For clean code and scalablility
  • 🌎 SEO - SEO meta data, open graph and more
    • βœ… Sitemap - Sitemap generator
    • βœ… RSS - RSS generator
    • βœ… Open graph - Advanced open graph SEO
    • βœ… ️Robot - Robot txt configuration
    • βœ… Canonical - Auto canonical url
    • βœ… Google search console - For SEO stadistics
    • βœ… Google analytic - For analytics of the webpage
  • πŸ“ Linter - Linter and formatting all kind of files
    • βœ… Eslint - Litner and formatting ts and js files
    • βœ… Stylelint - Linter css files
  • πŸ•ΉοΈ Git - Control version and more
    • βœ… Github issue template - Github issues organization
    • βœ… Githooks - Git hook for validate code quality
    • βœ… Changelog - Changelog and realese for github
    • βœ… Sematic release - Automatization of releases
  • βš™οΈ Configuration - Vscode, env variables and more
    • βœ… Vscode configuration - Vscode recommendations, extensions and more
    • βœ… Env validation - Enviroment variables validation
    • βœ… Htaccess snipets - Differents htaccess for all kind of situations
  • 🧩 Components
    • βœ… Image component - Ready to use optimize image component
    • βœ… Show component - Ready to use show component
    • βœ… For component - Ready to use for map components
  • ️⚑️ Performance
    • βœ… Web worker (partytown) - For lazy-loaded large libraries
    • βœ… Bundler analizer - Analize your bundle size
    • βœ… Compress - Compress images, font, css, js, and html
    • βœ… Non blocking - Non blocking js, css and more
    • βœ… Font optimization - Font transformation and declaration
  • πŸ“¦ Pnpm - Fast package manager
  • πŸ’― Perfect lighthouse score - Because performance matters

⚑️ Requirements

  • node >= 20.10.0
  • git >= 2.38
  • pnpm >= 8.2.0

(back to top)


πŸ“¦ Installation

After cloning the repo run this command to install all the dependencies

pnpm install

(back to top)


βš™οΈ Configuration

The configuration needed for this project is to set up the env variables and also the site configuration object here are the examples:

Site configuration

This file is located in src/global/configuration/site_configuration.ts

  • siteName - Global title of the webpage
  • description - Global description of the webpage
  • defaultLocale - Default locale of the webpage
  • autor - Author object that appears in a meta tag
    • author.name - Name of the author
    • author.email - Email of the author
    • author.web - Web of the author
  • googleSiteVerificationId - Id of google search console
  • googleAnalyticId - Id of the google analytics

Evironment varaibles

This environment variables are located in src/global/env/**.env

file: .example.dev.env

PORT=3000
BASE_URL=http://localhost:$VITE_PORT

file: .example.prod.env

BASE_URL=

file: .example.staging.env

PORT=4173
BASE_URL=http://localhost:$VITE_PORT

(back to top)


πŸš€ Usage

Before installing all the dependencies you can run the project with

pnpm dev

To see the production ready page you can run

pnpm staging

Builds the app for production to the dist folder.

It correctly bundles Solid in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes, also it compress all the assets and images in the dist folder.

Your app is ready to be deployed.

(back to top)


⚑️ Scripts

The following scripts are available in the package.json:

  • preinstall: This script is for only allow pnpm as package manager
  • postinstall: This script is for setting up the git hooks and validate the error after commit to github
  • dev: This script is for see the webpage in dev mode
  • staging: This script is for see production, this run the env variables an set the webpage with all the settings
  • build-dev: This script compile the project in dev mode
  • build: This script is for build in production
  • lint: This script is for format and lint all the files
  • lint-eslint: This script is for lint ts, tsx and more files
  • lint-stylelint: This script is for lint css files

(back to top)


🌎 Browser support

Here is the list of all the browser this website support

edge
IE / Edge
firefox
Firefox
safari
Safari
safari
Safari IOS
samsung internet
Samsung
opera
Opera
βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ

(back to top)

About

πŸ“¦οΈ This repository that contains an Astro template ready for any website you can imagine. It's like a Swiss Army knife for developers, offering pre-built modules and flexible configurations to kickstart your project, regardless of its type.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published