Skip to content

Instantly share code, notes, and snippets.

View ayshptk's full-sized avatar
💭
I may be slow to respond.

ayush ayshptk

💭
I may be slow to respond.
View GitHub Profile
@ayshptk
ayshptk / pages.py
Last active October 4, 2023 20:37
quickly run this script to generate your github pages beautifully. make sure to switch ages rendering to `docs` folder
# make sure to `pip install markdown` before you run this script :)
# generates beautiful html files in `docs` folder for every markdown file in the root folder
import shutil, markdown, os; shutil.rmtree("docs") if os.path.exists("docs") else None; os.mkdir("docs"); [open("docs/" + file.name.replace(".md", ".html"), "w").write('<link href="https://cdn.statically.io/gh/ayshptk/html.css/main/flavor/white.min.css" rel="stylesheet" >\n<meta name="viewport" content="width=device-width, initial-scale=1.0">\n' + markdown.markdown(file.read())) for file in [open(file, "r") for file in [f for f in os.listdir() if f.endswith(".md")]]]
### Keybase proof
I hereby claim:
* I am ayshptk on github.
* I am ayshptk (https://keybase.io/ayshptk) on keybase.
* I have a public key ASBtnO-UIfowjR4vrf-c-nC5kB4v_gMSPUTuLOohetZEZAo
To claim this, I am signing this object: