This repository contains the source code and content for the The 3Deer Portfolio website.
The site is a static website generated from Markdown files, providing a clean and maintainable way to manage project documentation.
The website is built using a Python script (generate.py) that converts Markdown files into fully-styled HTML pages. This process ensures a consistent look and feel across the entire site.
The generation process involves:
- Home Page: The main
index.htmlis generated fromINDEX.md(for content) andindex_template.html(for layout and style). - Project Pages: For each project folder (e.g.,
android-model-engine), an HTML page is generated from itsREADME.mdfile using theproject_template.html. - Automatic Menus: The top navigation and in-page sidebars are automatically generated by the script, linking all pages together.
The repository is organized to keep content and logic separate.
.
├── android-model-engine/
│ └── README.md # Source content for the Engine project page
├── android-model-viewer/
│ └── README.md # Source content for the Viewer project page
├── generate.py # The main Python script for site generation
├── INDEX.md # Source content for the main index.html page
├── index_template.html # Template for the main index.html page
├── project_template.html # Template for all individual project pages
└── README.md # This file
To update the website or add new content, you will need to run the generation script locally.
- Python 3.x
pip(Python package installer)
The script requires the Markdown library. Install it using pip:
pip install MarkdownNavigate to the root of the repository in your terminal and execute the Python script:
python generate.pyThe script will automatically find all projects, process the Markdown files, and create/update the necessary .html files in the root directory.
After running the script, you can open the generated index.html file in your browser to preview the changes. Once you are satisfied, commit and push all the updated files (.html, .md, etc.) to the main branch. GitHub Pages will automatically serve the new version of your site.
- Create a Project Folder: Add a new directory in the root of the repository (e.g.,
my-new-project/). - Add a README: Inside the new folder, create a
README.mdfile and write the documentation for your project. Use Markdown headers (#,##, etc.) to structure your content, as they will be used to generate the sidebar navigation. - Update the Home Page: Open
INDEX.mdand add a new section for your project, following the existing format:## my-new-project A brief description of my awesome new project. - Run the Generator: Execute
python generate.pyto build the new HTML page and update the navigation menus. - Commit all the new and modified files.