Skip to main content

Get started

Quickstart guide for Showcase theme.

Files structure

Unzip the theme folder and you'll see the next file structure:

  • dist - production files
  • src
    • assets
    • pages
    • templates
  • gulpfile.js
  • package.json
  • README.md

Setup

Note: If you prefer, you can simply use the static files that are in the dist folder and bypass the gulp workflow.

Theme's dev tools require Node and Gulp CLI. To install Node go to Node.js and follow the instructions. To install Gulp CLI run the following command:

npm i gulp-cli -g

Then run the following npm command to install all the theme's dependencies:

npm i

Showcase uses Browsersync to serve pages from the dist directory. Running gulp will compile the theme, copy all required files to the dist directory and will open a browser window to dist/index.html.

gulp

The theme uses Nunjucks as a template engine, basically to include partials (header, footer...). Gulp renders Nunjucks templates to HTML.

Purge CSS

Once your files are ready for production, you can remove all unused CSS using purgecss. To do it just run the following command:

gulp uncss

Purgecss analyzes the HTML and Bootstrap JS files and removes unused CSS content. Your CSS file size will be greatly reduced.


Basic template

The basic template is a guideline for how to structure your pages when building with this theme.

                        
                            <!doctype html>
                            <html lang="en">
                            <head>
                                <meta charset="utf-8">
                                <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

                                <!-- Google Fonts -->
                                <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Sans:300,400,400i,500" >

                                <!-- CSS (including Bootstrap) -->
                                <link rel="stylesheet" href="assets/css/style.css">
                                <title>Showcase - Bootstrap Theme</title>
                            </head>

                            <body>
                                <!-- Main content -->
                            </body>

                            <!-- Bootstrap JS -->
                            <script src="assets/js/jquery.slim.min.js"></script>
                            <script src="assets/js/popper.min.js"></script>
                            <script src="assets/js/bootstrap.min.js"></script>
                        
                    

Changelog

1.0.0 - 03 Sep 2019

  • Initial release