Giter Site home page Giter Site logo

wowchemy-shortcode-data_utility's Introduction

Wowchemy Shortcode Starter Template

Looking to build and publish a Wowchemy shortcode that doesn’t exist yet?

Unsure if there's already a relevant shortcode? Explore the existing shortcodes.

Wowchemy makes it easy to create a beautiful website for free. Edit your site in Markdown, Jupyter, or RStudio, generate it with Hugo, and deploy with GitHub or Netlify. Customize anything on your site with widgets, themes, and language packs.

πŸ‘‰ Core Concepts

πŸ§‘β€πŸŽ¨ Create a Shortcode

  1. Click the Use This Template button on GitHub
    1. Name your repository wowchemy-shortcode-<SHORTCODE-NAME> where <SHORTCODE-NAME> is an appropriate name for your shortcode
  2. Browse your new GitHub project, click the go.mod file, and then the ✏️ pencil button to edit it
    1. Replace the placeholder URL in go.mod with your new GitHub URL in the form module github.com/<USERNAME>/wowchemy-shortcode-<SHORTCODE-NAME> where <USERNAME> is your GitHub username and <SHORTCODE-NAME> is the name of the shortcode
    2. Scroll to the bottom and click Commit Changes to save
  3. Browse to the layouts/shortcodes/ folder, click my-shortcode.html, and click the ✏️ pencil button to edit it
    1. Rename my-shortcode.html in the text box to a unique ID in the form github_<USERNAME>_<SHORTCODE-NAME>.html, again replacing <USERNAME> with your GitHub username and <SHORTCODE-NAME> with your shortcode name
    2. Scroll to the bottom and click Commit Changes to save
  4. Edit the HTML for your new shortcode

Example

Say your GitHub username is pikachu and you wish to create a shortcode named pokemon:

  1. We click Use This Template and enter wowchemy-shortcode-pokemon as the project name
  2. We replace the first line of go.mod with module github.com/pikachu/wowchemy-shortcode-pokemon
  3. We browse to the layouts/shortcodes/ folder, and rename my-shortcode.html to github_pikachu_pokemon.html
  4. We customize the HTML in github_pikachu_pokemon.html
  5. We add the shortcode to our site and share the shortcode with the community following the guide below

🌈 Add the Shortcode to your Site

  1. Install your shortcode in your site by referencing it at the bottom of your config/_defaults/config.toml:
    # At the bottom of your `config.toml` is a Module section:
    [module]
    
      # Your existing modules will appear here.
    
      # Add your shortcode's GitHub URL below.
      # Replace <USERNAME> and <SHORTCODE-NAME> with your GitHub username and shortcode name, respectively.
      [[module.imports]]
        path = "github.com/<USERNAME>/wowchemy-shortcode-<SHORTCODE-NAME>"
  2. Use your shortcode in page content. For example let's create content/post/test-my-shortcode.md:
    ---
    title: My shortcode
    date: '2020-11-27'
    ---
    
    Check out my shortcode:
    
    {{% github_pikachu_pokemon %}}Content to *process*.{{% /github_pikachu_pokemon %}}

πŸ“’ Share your Shortcode

Share your shortcode with the community on Discord and Twitter.

wowchemy-shortcode-data_utility's People

Contributors

garrettseepersad 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.