This project provides a template and script for creating your own LinkTree (or Taplink) style landing page using Python and GitHub Pages. It allows you to generate a static webpage that displays links to your various social media profiles or other important sites.
PythonPageLink is a static site generator that creates a personal link tree webpage. It uses Python and Jinja2 for generating HTML from a configuration file and can be easily deployed using GitHub Pages.
- Customizable Links: Define your links and their descriptions in a YAML file.
- Personalization: Customize your profile picture, bio, and site theme.
- Easy Deployment: Host your site on GitHub Pages with simple setup instructions.
config.yml
: Configuration file for site details.generate_site.py
: Python script to generate the static site.themes/custom/
: Custom theme directory with assets, CSS, JavaScript, and the HTML template.docs/
: Output directory for generated site files.
-
Clone the Repository
git clone https://github.com/king-tri-ton/pythonpagelink.git cd pythonpagelink
-
Install Dependencies
Make sure you have Python 3 and pip installed. Install the required Python packages:
pip install jinja2 pyyaml
-
Configure Your Page
Edit
config.yml
to update your personal information and links. Example configuration:name: "King Triton" picture: "assets/img/picture.jpg" bio: "Programmer python and php/laravel" meta: lang: "en" description: "Programmer python and php/laravel" title: "King Triton" author: "King Triton" siteUrl: "https://king-tri-ton.github.io/pythonpagelink/" links: - name: "Github" url: "https://github.com/king-tri-ton" - name: "Dev.to" url: "https://dev.to/king_triton" - name: "Patreon" url: "https://www.patreon.com/king_triton" - name: "Telegram" url: "https://t.me/king_triton" - name: "Instagram" url: "https://www.instagram.com/king_tri_ton" theme: "custom"
-
Customize Your Theme
- CSS: Modify
themes/custom/assets/css/styles.css
to adjust the styling of your site. - JavaScript: Update
themes/custom/assets/js/script.js
to add or change functionality. - HTML Template: Edit
themes/custom/index.html
for structural changes to your webpage.
- CSS: Modify
After customization, generate your static site by running:
python generate_site.py
This command will create the docs
folder with the generated files.
- Create a new repository on GitHub.
- Upload all files, including the
docs
folder, to the repository. - Go to the repository’s Settings section.
- In the Pages section, select the
master
branch and the/docs
folder as the source. - Save changes and wait for GitHub Pages to deploy your site.
Your site will now be available at https://<username>.github.io/<repository-name>/
.
You can check the final result at king-tri-ton.github.io/pythonpagelink.
This project is licensed under the MIT License.
If you have any questions or suggestions, feel free to reach out to me via telegram.