Skip to content

hwanseoc/hwanseoc.github.io

Repository files navigation

hwanseoc.github.io

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.

Getting Started

  1. Clone the repository:

    git clone https://github.com/hwanseoc/hwanseoc.github.io.git
    cd hwanseoc.github.io
  2. Install the required Python packages:

    pip install -r requirements.txt
  3. 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

Usage

  1. Place your Markdown content files (.md) in the content/ directory.
  2. (Optional) Customize the website's HTML structure by editing the templates/template.html file.
  3. Run ./script-build.sh to generate the HTML files in the docs/ directory (which is used for GitHub Pages).
    • By default, it reads from content/ and writes HTML files to docs/.
    • It uses GitHub Flavored Markdown (gfm) mode.
    • Non-markdown files in content/ are copied directly to docs/.
    • 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.

Advanced: Python Script Options

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) or gfm (GitHub Flavored Markdown, default).
  • --context: Specify a repository context (e.g., username/repo) when using gfm mode.

Acknowledgments

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors