Skip to main content

No project description provided

Project description

This is a small tool to render personal blog

Blog generator tool

Prerequisite

  1. make
  2. python
  3. poetry

Usage

  • I've created a tool to render from markdown file to static site by Python for my self.
  • To use this template, you need to clone the repo first. The project should have this structure:
    |_ prototypes/       # contains .md file, you will write your posts in here.
    |_ posts/            # contains all html posts file after run ./render
    |_ tags/             # contains all html tags file after run ./render
    |_ templates/        # contains jinja templates for constructing posts, tags html files
    |_ static/           # contains static file like styles or script for your pages
    |_ index.html        # home page of blog
    |_ app.py            # blog generator tool
    |_ test_app.py       # test all functions of blog generator tool
    |_ Makefile          # command for render html files
    |_ requirements.txt  # for create environment for github actions
    |_ poetry.lock
    |_ pyproject.toml

  • Firstly, if this is the first time you use this tool:

    • You need to fork this repo to your, then change the name of repo following this format: <your_github_username>.github.io. And cloning it to your local machine: git clone https://github.com/....
    • Then you need to create prototypes, tags and posts folder by run: make init.
  • Secondly, you need to install environment to render blog. Run: make install.

  • Then go to prototypes folder and write the your posts in .md format, edit the metadata and push them into prototypes folder. Notice that, the metadata of .md file you need to keep following these formats

title: ....
date: ....
tags: ....
name: ....
summary: ....
  • After the first time, you only need to write posts and render to html.

  • To render blog posts:

    • Run make clean to delete old html files.
    • Run make test to run test.
    • Run make run to render all html files to posts and tags folder.
  • Push to your repo, and go to https://<your_github_username>.github.io/ to see.

  • To read more about github pages. Read this guide

  • In addition, you can add a comment plugin your self call utterances. After that, go to templates/post.html and replace the script in {% block script %}{% endblock %} with your script.

  • You can put your information into config.yml file

@LICENSE: MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

myssg-0.2.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

myssg-0.2.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file myssg-0.2.1.tar.gz.

File metadata

  • Download URL: myssg-0.2.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.8 Darwin/21.5.0

File hashes

Hashes for myssg-0.2.1.tar.gz
Algorithm Hash digest
SHA256 be13e4d07be19e5b14c34c6a12c6fc0f7adf4c4e54cb205ba21588228423cd36
MD5 6b74db3b55fd42204cfe25dd7103d82f
BLAKE2b-256 4cb430952be4091daf5dba09887cd7e92450d93c076caa902276edff6aac6ece

See more details on using hashes here.

File details

Details for the file myssg-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: myssg-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.8 Darwin/21.5.0

File hashes

Hashes for myssg-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3bfbfb869b19a119dada2e1237b4f1518c6154111f2569573d3a11d344ceb61d
MD5 2da5655545489084f754732a188aee4d
BLAKE2b-256 16c3d76eb372bc47b313e9e191fd634cfffac7e7e1acc9b239a8b22228584639

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page