Coder Social home page Coder Social logo

seld.be's Introduction

Jigsaw Blog Starter Template

This is a starter template for creating a beautiful, customizable blog in Jigsaw with minimal effort. You’ll only have to change a few settings and you’re ready to go.

View a preview of the blog template.

Installation

After installing Jigsaw, run the following command from your project directory:

./vendor/bin/jigsaw init blog

This starter template includes samples of common page types, and comes pre-configured with:

  • A fully responsive navigation bar
  • Tailwind CSS, a utility CSS framework that allows you to customize your design without touching a line of CSS
  • Purgecss to remove unused selectors from your CSS, resulting in smaller CSS files
  • Syntax highlighting using highlight.js
  • A script that automatically generates a sitemap.xml file
  • A custom 404 page
  • A component for accepting signups for a Mailchimp newsletter
  • A sample contact form
  • A search bar powered by Fuse.js and Vue.js, which indexes your content automatically and requires zero configuration

Blog starter template screenshot


Configuring your new site

As with all Jigsaw sites, configuration settings can be found in config.php; you can update the variables in that file with settings specific to your site. You can also add new configuration variables there to use across your site; take a look at the Jigsaw documentation to learn more.

// config.php
return [
    'baseUrl' => 'https://my-awesome-jigsaw-site.com/',
    'production' => false,
    'siteName' => 'My Site',
    'siteDescription' => 'Give your blog a boost with Jigsaw.',
    ...
];

Tip: This configuration file is also where you’ll define any "collections" (for example, a collection of the contributors to your site, or a collection of blog posts organized by topic). Check out the official Jigsaw documentation to learn more.


Adding Content

You can write your content using a variety of file types. By default, this starter template expects your content to be located in the source/_posts/ folder.

The top of each content page contains a YAML header that specifies how it should be rendered. The title attribute is used to dynamically generate HTML title and OpenGraph tags for each page. The extends attribute defines which parent Blade layout this content file will render with (e.g. _layouts.post will render with source/_layouts/post.blade.php), and the section attribute defines the Blade "section" that expects this content to be placed into it.

---
extends: _layouts.post
section: content
title: Getting Started
date: 2018-12-25 12:13:14
description: Getting started with the Jigsaw blog starter template
cover_image: /assets/img/post-cover-image-2.png
featured: true
excerpt: ....
---

Adding Assets

Any assets that need to be compiled (such as JavaScript, Less, or Sass files) can be added to the source/_assets/ directory, and Laravel Mix will process them when running npm run dev or npm run prod. The processed assets will be stored in /source/assets/build/ (note there is no underscore on this second assets directory).

Then, when Jigsaw builds your site, the entire /source/assets/ directory containing your built files (and any other directories containing static assets, such as images or fonts, that you choose to store there) will be copied to the destination build folders (build_local, on your local machine).

Files that don't require processing (such as images and fonts) can be added directly to /source/assets/.

Read more about compiling assets in Jigsaw using Laravel Mix.


Building Your Site

Now that you’ve edited your configuration variables and know how to customize your styles and content, let’s build the site.

# build static files with Jigsaw
./vendor/bin/jigsaw build

# compile assets with Laravel Mix
# options: dev, prod
npm run dev

seld.be's People

Contributors

seldaek avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

seld.be's Issues

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.