A dynamic site built using Eleventy that generates a personalised portfolio and resume with PDF support based on user-provided data. https://portfolio.moekai.com
Find a file
2026-01-10 17:43:49 +08:00
scripts Remove unused module 2025-02-15 12:39:14 +08:00
src Add new Pepatung env vars 2025-02-15 12:37:10 +08:00
.babelrc Add babel config for ts support 2024-05-29 00:57:52 +08:00
.build-lean.env Update default image reg 2026-01-10 17:43:49 +08:00
.build.env Update default image reg 2026-01-10 17:43:49 +08:00
.dockerignore Update docker ignore list 2025-02-17 17:12:39 +08:00
.eleventy.js Update pepatung module import 2025-02-17 15:45:34 +08:00
.eslintignore Add eslint ignore list 2024-05-28 22:35:12 +08:00
.eslintrc.json Add eslint config for js and ts 2024-05-28 22:34:49 +08:00
.gitignore Ignore docker test env 2025-02-17 16:55:49 +08:00
.npmrc Configure @irfanhakim scoped registry to pull package from 2025-02-17 15:46:14 +08:00
.nvmrc Add recommended node and npm versions 2025-02-15 12:41:43 +08:00
.pa11yci.json Add pa11yci config for html linting 2024-05-29 00:50:39 +08:00
.stylelintrc.json Ignore comments without empty line prior inside css blocks 2024-05-29 15:44:00 +08:00
Dockerfile Fix entrypoint script path 2025-01-13 10:03:21 +08:00
Dockerfile.lean Exclude installed node modules 2025-01-15 16:20:32 +08:00
entrypoint.sh Support skipping site build 2024-06-15 04:05:54 +08:00
jest.config.js Add jest config for js testing 2024-05-29 00:53:47 +08:00
LICENSE Switch to the AGPL-3.0-only license 2025-02-03 17:20:10 +08:00
package-lock.json Reflect license change 2025-02-17 18:10:01 +08:00
package.json Update version number to 0.1.0 2025-02-17 17:03:46 +08:00
packages.txt Add alpine package dependencies 2024-06-14 21:44:46 +08:00
README.md Make note of pepatung env vars 2025-02-17 17:55:59 +08:00
tsconfig.json Add ts config 2024-05-28 22:30:45 +08:00
webpack.config.js Fix import/order linting error 2024-06-22 20:22:14 +08:00

Portfolio

A dynamic site built using Eleventy that generates a personalised portfolio and resume with PDF support based on user-provided data.

Table of Contents

Requirements

Features

  • Dynamic Content Generation: Automatically creates a personalised portfolio and resume view from user-supplied data.

  • PDF Conversion: Utilises Pepatung (Puppeteer) to generate PDFs of any hosted views with additional enhancements.

  • Multi-Arch Containerisation Support: Containerised for seamless deployments across multiple architectures.

  • Helm Chart: Helm support for a secure and straightforward deployment strategy to a Kubernetes cluster.

Installation

Local

  1. Ensure that you have met all of the project requirements.

  2. Clone the repository:

    git clone https://gitlab.com/irfanhakim/portfolio.git ~/portfolio
    
  3. Get into the local repository:

    cd ~/portfolio
    
  4. Run the install command:

    npm install
    
  5. Set any environment variables you need through an .env file.

  6. Supply your own required data files to the designated data directory.

  7. Run the site locally and navigate to the provided address in your browser to watch the site:

    npm start
    

Docker

A Docker container image for Portfolio is provided, but has not been tested to run:

  • Outside of a production environment.
  • Outside of a Kubernetes environment.

For the best experience, please deploy Portfolio using the official Helm chart.

In addition, there is also a Pepatung (Puppeteer) container that will be needed for the HTML to PDF conversion feature when deploying outside of a local environment - this is included out of the box when using the provided Helm chart.

Configuration

Environment variables

Environment variables are used to configure certain core options related to the project. For consistency, environment variables used throughout the project are consolidated in the settings/env.js module.

For local testing purposes, please supply your environment variables through an .env file in the root of this repository.

Option Description Sample Value Default Value
NODE_ENV The environment the site is running in. production Local: development, Docker: production
PORT The port number the site has been exposed to locally. 3000 Local: 8080, Docker: 80 (Immutable)
SITE_DATA The path to the Site global data file relative to the project data directory. .private/mysite.json site.json
USER_DATA The path to the User global data file relative to the project data directory. .private/myuser.json user.json
PEPATUNG_OUTPUT_DIR The directory to output the captured PDF. src/data/.private dist/assets/docs
PEPATUNG_OUTPUT_FILE The name of the output PDF file. myresume.pdf resume.pdf
PEPATUNG_URL_BASE The base URL of the site to capture as PDF. https://example.com http://localhost:${port}
PEPATUNG_URL_PATH The URL path of the site to capture as PDF. index.html resume

Additional Pepatung-specific environment variables can also be supplied through the same way.

Global data

Global data is an easy way of supplying data of various kinds to the site. In Portfolio, they are used to generate a personalised portfolio and resume view for the user. Portfolio expects two global data files for two different types of data:

Site data

Portfolio looks for a Site data file in the project data directory based on the SITE_DATA environment variable. For local testing purposes, you could add your version of the data file to the src/data/.private directory and point to it accordingly in your environment.

Option Description Value Type Value Properties Default Values
name The full name of the site. string - Portfolio
shortname The short name of the site. string - portfolio
description A short and concise description of the site. string - -
theme_color The theme colour of the site. string - #f8f8f8
footer The content of the site footer. string - © ${userData.name} ${currentYear}
portfolio Site configuration options for the portfolio view. dict title, permalink title: Home, permalink: None (Default)
resume Site configuration options for the resume view. dict title, permalink title: Resume, permalink: None (Default)

User data

Portfolio looks for a User data file in the project data directory based on the USER_DATA environment variable. For local testing purposes, you could add your version of the data file to the src/data/.private directory and point to it accordingly in your environment.

Option Description Value Type Value Properties Default Values
name The display name of the user. string - -
about Content options pertaining to a summary about the user. dict title, content title: about
location The current location where the user is settled in. string - -
lists Content options pertaining to the user's lists. list dict(name, url, class, image, download) -
experience Content options pertaining to the user's experiences. dict key: list(dict(title, subtitle, description, infos, points)) key: experience
education Content options pertaining to the user's educational background. dict key: list(dict(title, description, infos)) key: education
qualification Content options pertaining to the user's qualifications. dict key: list(dict(title, description, infos)) key: qualification
references Content options pertaining to the user's references. dict key: list(dict(title, description, infos)) key: references
skills Content options pertaining to the user's skills. dict key: dict(${name}: ${level}) key: skills

This list of options has been simplified - for more detailed information, please refer to the included data file itself.

License

This project is licensed under the AGPL-3.0-only license. Please refer to the LICENSE file for more information.