Coder Social home page Coder Social logo

grantbirki / astrowind-hard-fork Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 13.41 MB

Template repo for AstroWind on GitHub pages - Heavily favoring js config files

Home Page: https://astro-demo.birki.io/

License: MIT License

JavaScript 22.98% CSS 0.96% Astro 58.89% TypeScript 6.74% Shell 0.02% MDX 10.40%
astro github-pages static-site website

astrowind-hard-fork's Introduction

๐Ÿš€ AstroWind

deploy ci lint CodeQL

This is a custom AstroWind template for deployment to GitHub pages

example

The original AstroWind template can be found here: source

โš ๏ธ Due to how fast the upstream source project has been moving and with how fast the Astro project has been moving, I am abandoning this fork. โš ๏ธ

Features

How is this template fork different?

This fork is designed for those who are not extremely familiar with Astro, or even web development in general. It is designed to be a simple, easy to use template for those who want to get started with Astro, but don't want to spend hours configuring the template.

This fork is also designed to be deployed to GitHub pages, which is a free and easy way to host your website.

Full Offline Development Support

After running npm i and npm run dev for the first time, you can develop your site completely offline!

Config Files

The core way this template is different from the original is that it heavily uses .js config files to configure data and content for its site.

Here are a few common config directories and what you will find there:

Pages

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.

Any static assets, like images, can be placed in the public/ directory if they do not require any transformation or in the assets/ directory if they are imported directly.

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:3000
npm run build Build your production site to ./dist/
npm run preview Preview your build locally, before deploying
npm run format Format codes with Prettier
npm run lint:eslint Run Eslint
npm run astro ... Run CLI commands like astro add, astro preview

Development

Here are some basic commands to get you up and running to develop with this template:

  1. Install npm dependencies

    npm i
  2. Start the development server

    npm run dev
  3. View your site at localhost:3000

Live reload is enabled by default, so any changes you make will be reflected in the browser.

Deployment

Deployment docs for GitHub Pages

First, clone this repository to your own GitHub account

If you want to deploy to a basic GitHub domain name, do the following to src/config/site/config.js:

origin: 'https://grantbirki.github.io', // Change this to your GitHub username
basePathname: '/astrowind', // Change this to your repository name

If you want to use your own custom domain name, do the following to src/config/site/config.js:

origin: 'https://astro-demo.birki.io', // Change this to your custom domain name make sure it points to your GitHub Pages domain
basePathname: '/', // leave this as a single /

Ensure you have configured GitHub Pages to use the GitHub Actions deployment option. When you push changes to your repository, GitHub will automatically build and deploy your site.

Branch Deploy

This template also comes bundled with the branch-deploy Action. Please ensure you view the branch-deploy.yml file and make any necessary changes if you wish to use it.

The branch-deploy Action will allow you to trigger branch deployments from pull requests by using comments such as .deploy.

Build Cache

This templates also uses a custom GitHub Actions build cache to help speed things up in CI when processing images. If you make any changes to images when working on a project using this template, please ensure to run npm run build before deploying to ensure your cache.json file is updated.

Using this Template

You should probably do a search through this repo and replace all occurances of astro-demo.birki.io with your own domain as well.

Making Changes

This section goes into details on how you can make changes to the template.

Live Commit Examples

Actual examples in the form of commits to this repository:

Acknowledgements

This theme is based off the template by onwidget

astrowind-hard-fork's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar grantbirki avatar theotterlord avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

theotterlord

astrowind-hard-fork's Issues

Task: Monitor Changes to `astro-icon`

Task: Monitor Changes to astro-icon

This issue is for tracking changes to the astro-icon package. I am waiting for it to be updated for offline support. As soon as that is ready, I will upgrade the package in this repo so that this template can include better support for offline development

natemoo-re/astro-icon#87 ๐Ÿ‘€

New bugs

  • Header in dark mode changes color on mobile

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.