GithubHelp home page GithubHelp logo

serg / use-shortcodes Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 77 KB

๐Ÿ”ง Useful shortcodes for your next Hugo website

Home Page: https://useshortcodes.netlify.com/

License: MIT License

JavaScript 13.83% HTML 19.01% CSS 67.16%
hugo hugo-shortcodes hugo-boilerplate

use-shortcodes's Introduction

Useful shortcodes

The set of the implementations for some shortcodes. These shordcodes can be used for managing content on the Hugo website. The main goal of this project is creating useful shortcodes, that will be optimized for working fast. This project used the hugo-init boilerplate, but the shortcode implementations can be migrated on other project templates/build tools without any issues.

Here is the live demo: https://useshortcodes.netlify.com/

Please note by using this project you understand the implications and guarantees of the MIT license.

Requirements

Before start you already need to have these applications on aboard:

  • Node 6.x+ (LTS version) and npm (shipped with node installation)

Installation

Clone project and install all dependencies by running these commands:

$ git clone https://github.com/serg/use-shortcodes.git
$ cd use-shortcodes
$ npm install

Development mode

Build assets with Brunch and Hugo, start a development server:

$ npm start

The application will be available at the http://localhost:1313 link in your browser. All changes in the src/ and site/ folders will be synced and displayed in browser automatically.

Production mode

To build the application for production use this command:

$ npm run build

All created files will be available in the public/ folder of project.

Preview mode

To build the application like for production, but with some restrictions use the command:

$ npm run preview

A website will be generated by applying almost all production features, except:

  • all draft pages are included;
  • the Google Analytics code is absent on the pages;
  • all pages have the rules for prevent of indexing by search engines if you deploy website on a hosting for the testing reasons;
  • the robots.txt file has a rule for prevent of indexing a whole website.

All above restrictions will be applied for the development mode also, except the assets (js, css) optimization and minification. You can find the files of website in the public/ folder as always.

Restrictions for production

Your markdown file (in content/ folder) needs to be not a draft for including its content into a website template. Change the draft value to false inside a certain page for publishing its content:

draft: false

All website pages contain the noindex and nofollow values in the meta tags when website was generated in the development or preview mode. Also the Google Analytics is absent on a page and the robots.txt file has an option for prevention of indexing by search engines. When you will be ready to share your website with a world please run the build of application in the production mode.

Deployment of a website

You can move the generated website from the public/ folder to on any type of a hosting provider for the static files. One of an option for the simplest and fastest deploying your site is using the Netlify service. Besides the Netlify provide a great service with a lot of features for free and your website will never slow down the speed of loading for a webpage when deliver it to your users. The instructions for the deploying to Netlify below.

Now Netlify will build and deploy your site whenever you push to git.

License

MIT ยฉ Sergey Furtak

use-shortcodes's People

Contributors

serg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.