Git Product home page Git Product logo

blog-generator's Introduction

Blog Generator:

Below are the procedures on how to use the blog-generator to create a new blog

Generating JSON file for the blog content

Inside the JSON file and filling in the details

Creating the static blog page

HTML template changes and modifying all blogs

Generating JSON file for the blog content

Generate the json file to put the blog contents. Run new-blog.py and add the url to your new blog.

> python new-blog.py new-blog

This creates the file new-blog.json

Inside the JSON file and filling in the details

The generated json file will look as follows:

    {
        "url": "new-blog",
        "blog_image": "",
        "tags" : [],
        "title" : "",
        "body" : []    
    }
key what to add example
url this is automatically generated
blog_image a file name that exists in the blogs/images folder NOTE: only one image can be added to every blog post "new_blog_image.jpg"
tags a list of tags for the blog post ["android", "music", "travel"]
title The title of the blog post "New Blog"
body The main content of the blog. Each paragraph should be a separate element in the list ["This is paragraph 1", "This is paragraph2"]

Creating the static blog page

Once filling in the json is completed, the next step is to generate the html file for the blog page. To do so, run add-blog.py and add the same url to your blog.

> python add-blog.py new-blog

The url to the new blog post will now be "website.com/blogs/new-blog>"

HTML template changes and modifying all blogs

In case you want to update the look of each page, it can easily be done by modifying the blog-template.template file. Once it is updated, you can easily update all blog posts by running

> python modify-blogs.py

blog-generator's People

Contributors

jessicaprt avatar

Watchers

James Cloos avatar  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.