Giter Site home page Giter Site logo

hugomplate-demo's Introduction

Hugo + Gomplate = Good Stuff

Head over to the gomplate docs or Hugo docs for details about those projects.

Please treat this as a Proof of Concept rather than a proper Tutorial. Probably not for absolute beginners.

What this is

A project demonstrating what happens when you combine gomplate and hugo.

I am using gomplate to populate the /content/ directory from a datasource. Hugo does the rest.

How to use

Install hugo and gomplate. Refer to their respective documentation sites for details how.

Hugo Demo

Navigate to hugo-demo and run gomplate

This will populate hugo-demo/content/posts/ with posts from https://jsonplaceholder.typicode.com/posts.

Run hugo server to see it as a Hugo website in action.

Gomplate Demos

Navigate to gomplate-demo and try the different config files:

API datasource

gomplate --config api.yaml

This will populate outputs/api with posts from https://jsonplaceholder.typicode.com/posts.

Sample output can be found at sample-outputs/api/

Local JSON file datasource

gomplate --config localjson.yaml

This will populate outputs/localjson with .md posts from sources/datasource.json.

Sample output can be found at sample-outputs/localjson/

CSV file datasource

gomplate --config localcsv.yaml

This will populate outputs/localcsv with .md posts from sources/datasource.csv.

Sample output can be found at sample-outputs/localcsv/

Notes

Not a Hugo dev. Not a gomplate dev. Not really a Go dev at all.

Big thanks to the people behind Hugo and gomplate for developing these awesome products.

License

MIT.

hugomplate-demo's People

Contributors

pointyfar avatar

Stargazers

 avatar  avatar  avatar

Forkers

ishara

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.