No project description provided
Project description
This is a small tool to render personal blog
Prerequisite
makepythonpoetry
Usage
- I've created a tool to render from markdown file to static site by
Pythonfor 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
forkthis 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,tagsandpostsfolder by run:make init.
- You need to
-
Secondly, you need to install environment to render blog. Run:
make install. -
Then go to
prototypesfolder and write the your posts in.mdformat, edit the metadata and push them intoprototypesfolder. 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 cleanto delete old html files. - Run
make testto run test. - Run
make runto render all html files topostsandtagsfolder.
- Run
-
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.htmland replace the script in{% block script %}{% endblock %}with your script. -
You can put your information into
config.ymlfile
@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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be13e4d07be19e5b14c34c6a12c6fc0f7adf4c4e54cb205ba21588228423cd36
|
|
| MD5 |
6b74db3b55fd42204cfe25dd7103d82f
|
|
| BLAKE2b-256 |
4cb430952be4091daf5dba09887cd7e92450d93c076caa902276edff6aac6ece
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bfbfb869b19a119dada2e1237b4f1518c6154111f2569573d3a11d344ceb61d
|
|
| MD5 |
2da5655545489084f754732a188aee4d
|
|
| BLAKE2b-256 |
16c3d76eb372bc47b313e9e191fd634cfffac7e7e1acc9b239a8b22228584639
|