GithubHelp home page GithubHelp logo

marcanuy / hugoostrapped Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 252 KB

A Bootstrap centric Hugo theme

Home Page: https://marcanuy.github.io/hugoostrapped/

License: MIT License

HTML 11.05% CSS 88.25% Makefile 0.58% SCSS 0.12%
hugo theme hugo-theme layouts hugo-boilerplate hugo-boostrap hugo-skeleton bootstrap twitter-bootstrap

hugoostrapped's Introduction

logo

Hugo + Bootstrap theme

Hugo theme based on the Bootstrap starter template example with Bootstrap examples in the exampleSite.

This theme implements https://getbootstrap.com/docs/4.0/examples/ in Hugo, it focus on offering a quick way to have Bootstrap in your Hugo site with:

  • a clean setup and
  • the ability to customize Bootstrap variables.
  • Shortcodes Bootstrap components

https://marcanuy.github.io/hugo-bootstrap-examples-theme/.

Table of Contents

Features

Bootstrap variables customization

Customization ca be done in two steps:

  1. override variables:

Every Sass variable in Bootstrap 4 includes the !default flag allowing you to override the variable’s default value in your own Sass without modifying Bootstrap’s source code. Copy and paste variables as needed, modify their values, and remove the !default flag. If a variable has already been assigned, then it won’t be re-assigned by the default values in Bootstrap.

So in src/style.scss we can customize any Bootstrap variable and then import the complete Bootstrap styles which will incorporate our custom design:

 // Your variable overrides
 $body-bg: #000;
 $body-color: #111;

 // Bootstrap and its default variables
 @import "../node_modules/bootstrap/scss/bootstrap";
  1. Regenerate stylesheet:

The above file will be processed with node-sass and generate static/css/style.css after executing the make build recipe.

More on Bootstrap 4 customization: https://getbootstrap.com/docs/4.0/getting-started/theming/#variable-defaults.

Easy update

Bootstrap is a package.json dependency, it can easily be updated with npm update or yarn update.

Installation

Theme

Run the following commands inside your Hugo site folder:

$ git clone https://github.com/marcanuy/hugo-bootstrap-starter-template.git themes/hugo-boostrap-starter-template

Alternatively use git submodules in order to have a way to easily update the theme from the source in case you have your site in git as well. For this run the following commands inside your Hugo site folder:

$ git submodule add https://github.com/marcanuy/hugo-bootstrap-starter-template.git themes/hugo-boostrap-starter-template

If you checkout your site from a repository which has this added as a submodule (e.g. if you are using CI to deploy), execute following commands or put them into a initgit.sh file in your repository which can be executed by your CI:

$ git submodule init
$ git submodule update

In order to update all the existing submodules from their upstreams, you can either go into each submodule root folder and do the normal git pull or execute following command:

$ git submodule foreach git pull

Deps

Run make install to install theme dependencies. That will run yarn install (or npm install).

Build css

Run make build to generate CSS styles and copy the necessary Javascript libraries.

References

hugoostrapped's People

Contributors

dependabot[bot] avatar marcanuy avatar

Watchers

 avatar  avatar  avatar

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.