βš™οΈ Static site boilerplate. Using Gulp, PugJS, and Sass.

Overview

πŸ” Alaska | Static-site Boilerplate

Open Source License: CC0-1.0 Buy me coffee

⚑ Fastest way to build HTML and CSS static sites.

You don't have to learn complicated tools to build simple websites in a modular way.

Alaska uses efficient technology that's similar to what you're used to.

Technology Description
PugJS Templating tool for building HTML in a beautiful and modular way.
It's basically HTML, but modular, programmable, and without closing tags.
Sass CSS processor that extends the capabilities of current CSS.
GulpJS File processor to watch your files as you edit, reload the page on save, and build minified files.

Contents

  1. Running Alaska
    1. Requirements
    2. Installing
    3. Commands
  2. Build in Alaska
    1. Structure
    2. Gulpfile
  3. Coding with Poh πŸ»β€β„οΈ
    1. Poh's Guide to Pug
    2. Poh's Guide to Sass
  4. License (Read carefully)

Running Alaska

Running Alaska is quite simple. You just install all the npm dependencies and you're good to go.

But if you need some in-depth guidance, I'll hand it off to Poh, a friendly Polar Bear that will guide you on your journey to building in Alaska.

πŸ»β€β„οΈ
LET'S GO!!!

Chill, Poh. They want instructions, not hype.

πŸ»β€β„οΈ
Shut up. YOU! Let's go...

Requirements

πŸ»β€β„οΈ
If you want to do any running in Alaska, you have to prepare.
And I'm not talking about warm clothes and water.
I'm taking about N-P-M α΅α΅’α΅—Κ°α΅‰Κ³αΆ α΅˜αΆœα΅α΅‰Κ³`

Here's what you need to have installed on your machine:

  • NodeJS - Click to install.
  • NPM Cli - Click to learn how to install if Node didn't already install it.
  • Yarn (Optional) - Run: npm i -g yarn to install.
  • Gulp Cli - Run npm i -g gulp-cli to install.

πŸ»β€β„οΈ
Now we need to pull all the files from Github.
Go to your Projects folder cd ~/projects/ or whatever you use.
Then clone the project like this:

git clone [email protected]:pixelsbyeryc/alaska.git

If you have SSH

git clone https://github.com/pixelsbyeryc/alaska.git

In case you're cloning from HTTPS

Installing

πŸ»β€β„οΈ
Now what you have the code on your computer,
we're going to install the dependencies.
It's as simple as:

yarn

If you like using yarn instead of npm, or...

npm i

If you prefer the bland outputs of npm. Your choice.

Commands

πŸ»β€β„οΈ
There are two commands you can run:

yarn dev

Will watch the files for any changes and hotreload your browser.

yarn build

Will build your project under the folder /public

πŸ»β€β„οΈ
Want to stop the terminal from running?
Press Control+C on your terminal. It'll stop the execution.

Build in Alaska

πŸ»β€β„οΈ
To build in Alaska, you need to understand how the structure works.
We like to break our food, I mean, code in small portions, you feel me?

Lemme give you the ins-and-outs of this place...

Structure

πŸ»β€β„οΈ
Here's your folder/file structure:

alaska
|   .gitignore
|   gulpfile
|   LICENSE    
β”‚   package.json
β”‚   README.md
|   yarn.lock
β”‚
└───src
β”‚   └───js
β”‚   |   β”‚   magic.js
β”‚   |   β””   ...
|   |   
β”‚   └───sass
β”‚   β”‚   |   sassy.sass
β”‚   β”‚   β””   ...
|   |   
β”‚   └───views
|       └───_data
β”‚       |   |   data.pug
β”‚       |   β””   ...
β”‚       |   
|       └───_includes
β”‚       |   |   head.pug
β”‚       |   β””   ...
β”‚       |   
|       └───components
β”‚       |   |   header.pug
β”‚       |   |   footer.pug
β”‚       |   β””   ...
β”‚       |   
|       └───layouts
β”‚       |   |   base.pug
β”‚       |   β””   ...
β”‚       |   
|       └───pages
β”‚           |   index.pug
β”‚           β””   ...
β”‚   
└───public
    β””   ...

Source Files src

πŸ»β€β„οΈ
Source files are the ones you'll be editing.

Once will you run yarn dev or yarn build, Gulp will automatically process your files and spill them into the public folder.

Public Files public

πŸ»β€β„οΈ
Public files are ready for deployment.

They will have pretty and minified options for your JS and CSS files.
You can also set up in your Gulpfile.js to minify your HTMLs for a slimmer code.

Views src/views

πŸ»β€β„οΈ
Views folder will encompass all your Pug files β€” your HTML.

If If you need help coding in Pug, check out Poh's Guide.

Let's go over them:

  • Pages src/views/pages: This is where your single pages will live (eg: Home Page). You can add as many pages as you want. All of the .pug files here will be sent to the public folder.
  • Layouts src/views/layouts: Layouts are used to set up the basic structure of a page. You can re-use layouts on as many pages as you want.
  • Components src/views/components: Components help you to split up your code and make it more maintainable. You can also create components as Pug Mixins and pass data to them.
  • Includes src/views/_includes: Includes are chucks of code, much like components: they help you split up your HTML and make it more maintainable. I usually use them for things like <head> ... </head>.
  • Data src/views/_data: You can write JSON-like files with Pug and use them to iterate components so you don't have to write the same structure over and over and over again.

Styles src/sass

πŸ»β€β„οΈ
Sass folder will encompass all your Sass files β€” your CSS.

For now, we only have our sassy.sass β€” which is the main file.
But we encourage you to create more files and organize them as you wish.

Note: Currently, Gulp only moves sassy.sass as sassy.css to the public folder. If you want to add another file to public, modify your Gulpfile.

If If you need help coding in Sass, check out Poh's Guide.

Scripts src/js

πŸ»β€β„οΈ
Scripts folder will encompass all your JS.

For now, we only have one file called magic.js.
You can create as many files as you want.

Note: Currently, Gulp only moves magic.js to the public folder. If you want to add another js file to public, modify your Gulpfile.

Gulpfile

πŸ»β€β„οΈ
Gulpfile uses functions to process specific files.

I'm lazy to keep writing this doc right now, so here's the file: gulpfile.js.
Check it out.

Coding with Poh πŸ»β€β„οΈ

πŸ»β€β„οΈ
Coming soon!

Poh's Guide to Pug

πŸ»β€β„οΈ
Coming soon!

Here's a preview of how a Pug file turns into an HTML file:

file.pug

body.class
    header.header
        nav.nav-links
            a(href="/", target="_blank") Link Text

    main.main
        section.section
            h1.heading.--huge Page Title
            p This is a paragraph.

file.html

<body class="class">
    <header class="header">
        <nav class="nav-links">
            <a href="/" target="_blank">
                Link Text
            </a>
        </nav>
    </header>
    <main class="main">
        <section class="section">
            <h1 class="heading --huge">
                Title
            </h1>
            <p> This is a paragraph.
        </section>
    </main>
</body>

Poh's Guide to Sass

πŸ»β€β„οΈ
Coming soon!

License

😝 License to do whatever ᡗʰᡉ ᢠᡘᢜᡏ you want. Go nuts.

cc-0

You might also like...

Projeto responsivo, que simula uma Landing Page de uma site de turismos.

Projeto responsivo, que simula uma Landing Page de uma site de turismos.

FlexTurismos Projeto responsivo, que simula uma Landing Page de um site de turismos. Tecnologias utilizadas: Site com a tela interia Click aqui para a

Jan 29, 2022

Skeleton: A Dead Simple, Responsive Boilerplate for Mobile-Friendly Development

Skeleton Skeleton is a simple, responsive boilerplate to kickstart any responsive project. Check out http://getskeleton.com for documentation and deta

Dec 29, 2022

CSS Boilerplate / Starter Kit: Collection of best-practice CSS selectors

Natural Selection Natural Selection is a CSS framework without any styling at all. It is just a collection of selectors that can be used to define glo

Dec 8, 2022

A modern, responsive CSS boilerplate library to kickstart any web-based project.

A modern, responsive CSS boilerplate library to kickstart any web-based project.

Peacock CSS Peacock is a modern, responsive CSS boilerplate library to kickstart any web-based project. It is simple, lightweight and it contains all

Jan 23, 2022

Front-end framework with a built-in dark mode and full customizability using CSS variables; great for building dashboards and tools.

This is the main branch of the repo, which contains the latest stable release. For the ongoing development, see the develop branch. Halfmoon Front-end

Dec 26, 2022

Easily create and maintain style guides using CSS comments

Easily create and maintain style guides using CSS comments

mdcss lets you easily create and maintain style guides with CSS comments using Markdown. /*--- title: Buttons section: Base CSS --- Button styles c

Oct 4, 2022

A Simple and beautiful template for blog or portfolio using Next js.

Next js Blog Configuration Update your name in theme.config.js or change the footer. Update your name and site URL for the RSS feed in scripts/gen-rss

Apr 20, 2022

Web application that detects and counts the number of roses using an artificial intelligence model.

Web application that detects and counts the number of roses using an artificial intelligence model.

Web application that detects and counts the number of roses using an artificial intelligence model. The application uses a local image, or you can take a picture with the camera.

Dec 16, 2021

RxHtmlButtonLibrary - Html Button Styling Library by roxunlimited.com using CSS and jQuery.

RxHtmlButtonLibrary - Html Button Styling Library by roxunlimited.com using CSS and jQuery.

rxHTMLButton Library v0.3 rxHTMLButton Library will work on almost every HTML tag. It will smoothly work on 'a href link', 'button type button', 'inpu

Sep 16, 2022
Comments
  • ⬆️ Bump decode-uri-component from 0.2.0 to 0.2.2

    ⬆️ Bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Owner
Alaska Labs
πŸ” Code for everyone. [cc0]
Alaska Labs
A CSS button library built using Sass and Compass

Buttons 2.0 Buttons 2.0 Buttons is a highly customizable production ready mobile web and desktop css button library. Buttons is a free open source pro

Alex Wolfe 5.1k Jan 4, 2023
An NPM package to help frontend developers get started with using SASS and SCSS on your project easily. The Package follows the 7-1 architecture project structure.

Project Title - Create SASS APP Ever wanted to code up a frontend project with SASS & SCSS and you are stuck with building the acclaimed 7-1 architect

Kelechi Okoronkwo 7 Sep 22, 2022
Extensible, scalable, Sass-based, OOCSS framework for large and long-lasting UI projects.

Extensible, scalable, Sass-based, OOCSS framework for large and long-lasting UI projects. inuitcss is a framework in its truest sense: it does not pro

inuitcss 1.8k Dec 30, 2022
Source code for Chrome/Edge/Firefox/Opera extension Magic CSS (Live editor for CSS, Less & Sass)

Live editor for CSS, Less & Sass (Magic CSS) Extension Live editor for CSS, Less & Sass (Magic CSS) for Google Chrome, Microsoft Edge, Mozilla Firefox

null 210 Dec 13, 2022
A Lightweight Sass Tool Set

A Lightweight Sass Tool Set Bourbon is a library of Sass mixins and functions that are designed to make you a more efficient style sheet author. It is

thoughtbot, inc. 9.1k Dec 30, 2022
A collection of CSS3 buttons implemented in Sass.

CSS3 Buttons This is a collection of buttons that show what is possible using CSS3 and other advanced techniques, while maintaining the simplest possi

Chad Mazzola 1.3k Nov 8, 2022
Convert css (scss/sass) to vanilla-extract.

CSS-to-vanilla-extract ⚑ Welcome ?? Convert CSS (SCSS/SASS) to vanilla-extract. playground Install npm i -D c2ve Usage Once installed, you can run it

j1ngzoue 31 Jan 4, 2023
A modern static resume template and theme. Powered by Jekyll and GitHub pages.

modern-resume-theme A modern simple static resume template and theme. Powered by Jekyll and GitHub pages. Host your own resume on GitHub for free! Vie

James Grant 1.5k Dec 31, 2022
πŸ“± Free to use static generated website template for your mobile app

Mobile App Landing Page Template ?? Free to use static generated landing page template for your mobile app ?? Features Mobile App Landing Page Templat

Sandoche ADITTANE 467 Dec 30, 2022
Author styles collocated in JS, pull them out into static CSS on build. No runtime dependency.

Author styles collocated in JS, pull them out into static CSS on build. No runtime dependency. the big idea: I like to author styles collocated with c

Siddharth Kshetrapal 90 Sep 11, 2022