Personal Website for Hwanseo Choi. The static page for the website is generated by a Python script from the Markdown files in the content/ directory using the GitHub Markdown API and Jinja2 templates.
-
Clone the repository:
git clone https://github.com/hwanseoc/hwanseoc.github.io.git cd hwanseoc.github.io -
Install the required Python packages:
pip install -r requirements.txt
-
Run the build script to compile Tailwind CSS and generate HTML files:
./script-build.sh
This downloads the Tailwind CSS standalone binary (if not present), compiles the CSS, and generates the HTML files.
Alternatively, to watch for file changes and rebuild automatically (Linux only, requires
inotifywait):./script-watch.sh
- Place your Markdown content files (
.md) in thecontent/directory. - (Optional) Customize the website's HTML structure by editing the
templates/template.htmlfile. - Run
./script-build.shto generate the HTML files in thedocs/directory (which is used for GitHub Pages).- By default, it reads from
content/and writes HTML files todocs/. - It uses GitHub Flavored Markdown (
gfm) mode. - Non-markdown files in
content/are copied directly todocs/. - You can specify the title for each page using an HTML comment in the markdown file:
<!-- title: Your Page Title -->. If not specified, the filename (without extension) is used.
- By default, it reads from
The build script runs gh-md-to-html.py internally. For custom configurations, you can run it directly with these options:
--inputdir: Specify the input directory (default:content).--outputdir: Specify the output directory (default:docs).--mode: Set the rendering mode. Options:markdown(standard Markdown) orgfm(GitHub Flavored Markdown, default).--context: Specify a repository context (e.g.,username/repo) when usinggfmmode.