AngelCruzL / website-starter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Website Starter Template

This is a starter template to develop a website using a basic HTML/CSS/JS stack.

The template is bootstrapped with Vite and has a structure that allows to work with SCSS to handle the website styles implementing a custom architecture based on the 7-1 pattern.

Getting started

To use the template as a starter for a new project you can press on the "Use this template" button on the top of the page.

use-this-template.png

This will create a new repository with the same structure as this one.

If you want to clone the repository you can do it with the following command:

git clone https://github.com/AngelCruzL/website-starter.git

Prerequisites

Installation

pnpm install

Development

pnpm dev

This will start a development server on http://localhost:5173.

Build

As every Vite project, the build command will generate a production-ready version of the website.

pnpm build

Deploy

By default, now the template has preconfigured a deployment to GitHub Pages. This thanks to the deploy.yml file in the .github/workflows folder. That file contains the configuration to execute a GitHub Action that will deploy the website to the gh-pages branch.

Since this is a GitHub Action, it will only work if the repository is hosted on GitHub, also this works only on the main branch and just on pull request action.

After your first commit, you can go to the Actions tab on your repository and see the action running, this will fail because you need to make some changes to the repository configuration.

To finish this configuration you need to enable the next on the repository where you will to deploy (or store) your project to make this work automatically:

  • On the repository settings, go to Actions/General and enable the next configuration:

actions-config.png

  • Then go to Pages and enable the next configuration:

pages-config.png

This allows you to deploy the website to the gh-pages branch and serve it from there. If you have problems with this you maybe need make a Secret Key to work with the GitHub Action.

About


Languages

Language:SCSS 97.1%Language:JavaScript 1.5%Language:HTML 1.4%