• Stars
    star
    482
  • Rank 91,212 (Top 2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 6 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ‘” Portfolio thingy

๐Ÿ‘” Portfolio thingy.

matthiaskretschmann.com



๐ŸŽ‰ Features

The whole portfolio is a React-based single page app built with Next.js in Typescript, using only statically generated pages.

If you are looking for the former Gatsby-based app, it is archived in the gatsby-deprecated branch.

๐Ÿ’ One data file to rule all pages

All displayed project content is powered by one YAML file where all the portfolio's projects are defined. The project description itself is transformed from Markdown written inside the YAML file into HTML on build time.

Next.js automatically creates pages from each item in that file utilizing the [slug].tsx template.

๐Ÿ–ผ Project images

All project images live under public/images and are automatically attached to each project based on the inclusion of the project's slug in their filenames.

Next.js with next/image generates all required image sizes for delivering responsible, responsive images to visitors, including lazy loading of all images. For this to work, images are analyzed on build time and various image metadata is passed down as props.

๐Ÿฑ GitHub repositories

The open source section at the bottom of the front page shows selected GitHub repositories, sourced from GitHub.

On build time, all my public repositories are fetched from GitHub, then filtered against the ones defined in content/repos.yml, sorted by the last push date, and provided via the pageContext of the front page.

If you want to know how, have a look at the respective components:

๐Ÿ“ Location

On client-side, my current and, if known, my next physical location on a city level is fetched from my (private) nomadlist.com profile and displayed in the header.

Fetching is split up into an external serverless function, a hook, and display component. Fetching is done with a serverless function as to not expose the whole profile response into the browser.

If you want to know how, have a look at the respective components:

๐Ÿ’… Theme switcher

Includes a theme switcher which allows user to toggle between a light and a dark theme. Switching between them also happens automatically based on user's system preferences. Uses next-themes under the hood.

If you want to know how, have a look at the respective component:

๐Ÿ† SEO component

Includes a SEO component which automatically switches all required meta tags for search engines, Twitter Cards, and Facebook OpenGraph tags based on the browsed route/page.

If you want to know how, have a look at the respective component:

๐Ÿ“‡ Client-side vCard creation

The Add to addressbook link in the footer automatically creates a downloadable vCard file on the client-side, based on data defined in content/meta.yml.

If you want to know how, have a look at the respective component:

๐Ÿ’Ž Importing SVG assets

All SVG assets will be converted to React components with the help of @svgr/webpack. Makes use of SVGR so SVG assets can be imported like so:

import Logo from './components/svg/Logo'
return <Logo />

๐Ÿฌ Typekit component

Includes a component for adding the Typekit snippet.

If you want to know how, have a look at the respective component:

๐Ÿค“ Scripts

๐ŸŽˆ Add a new project

To add a new project, run the following command. This adds a new item to the top of the projects.yml file, creating the title & slug from the argument:

npm run new -- "Hello"

Then continue modifying the new entry in _content/projects.yml.

Finally, add as many images as needed with the file name format and put into public/images/:

SLUG-01.png
SLUG-02.png
SLUG-03.png
...

๐ŸŒ„ Favicon generation

This generates all required favicon sizes from:

  • src/images/favicon-512.png
  • src/images/favicon.svg (handcrafted, adaptive based on OS theme)

Also creates a web manifest.

npm run favicon

โœจ Development

git clone [email protected]:kremalicious/portfolio.git
cd portfolio/

# GITHUB_TOKEN is required for some parts
# See https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token
cp .env.sample .env
vi .env

npm i
npm start

๐Ÿ”ฎ Linting

ESLint, Prettier, and Stylelint are setup for all linting purposes:

npm run lint

To automatically format all code files:

npm run format

๐Ÿ‘ฉโ€๐Ÿ”ฌ Testing

Test suite is setup with Jest and react-testing-library.

To run all tests, including type checking and linting of all files:

npm test

Most test files live beside the respective component. Testing setup, fixtures, and mocks can be found in the tests/ folder.

๐Ÿšš Deployment

Every branch or Pull Request is automatically deployed by Vercel with their GitHub integration, where the main branch is automatically aliased to matthiaskretschmann.com. A link to a preview deployment will appear under each Pull Request.

A backup deployment is also happening to a S3 bucket, triggered by pushes to main and executed via GitHub Actions. The deploy command simply calls the scripts/deploy-s3.sh script, syncing the contents of the public/ folder to S3:

npm run deploy:s3

Upon live deployment, deploy script also pings search engines. GitHub requires the following environment variables to be setup for successful deployments in the repository secrets:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_DEFAULT_REGION

๐Ÿ› Licenses

ยฉ Copyright 2023 Matthias Kretschmann

All images and projects are plain ol' copyright, most displayed projects are subject to the copyright of their respective owners.

Don't care if you fork & play with it, but you're not allowed to publish anything from it as a whole without my written permission. Also please be aware, the combination of typography, colors & layout makes up my brand identity. So please don't just clone everything, but rather do a remix!

All the rest, like all code and documentation, is under:

The MIT License

Full MIT license text

More Repositories

1

gatsby-plugin-matomo

๐Ÿฅ‚ Gatsby plugin to add Matomo (formerly Piwik) onto a site.
JavaScript
56
star
2

wp-icons-template

Admin icons template & functions for WordPress
PHP
51
star
3

blog

๐Ÿญ My blog kremalicious.com built with Astro + TypeScript. Neat.
TypeScript
48
star
4

kbdfun

โŒจ๏ธ Using <kbd> for fun & profit
31
star
5

appstorebadges

โšก๏ธ CSS/SVG based App Store badges
HTML
18
star
6

glassfruit

Growl notification style inspired by displays of a particular fruit company
9
star
7

hyper-mac-pro

๐Ÿ Tab style for Hyper inspired by Apple's pro apps on macOS.
JavaScript
9
star
8

gatsby-redirect-from

๐ŸŽฏ Set redirect urls in your frontmatter within your Gatsby site's Markdown files.
JavaScript
8
star
9

Badged

WordPress plugin transforming the standard WordPress update & comment notification badges into iOS-styled ones, image-less with CSS only.
PHP
7
star
10

blowfish

๐Ÿก Simple Electron-based desktop app to retrieve and display your total Ocean Token balances.
JavaScript
6
star
11

csspaperstack

Pure CSS3 based solution for creating the illusion of stacked papers
5
star
12

dotfiles

๐Ÿ‘ฉโ€๐ŸŽค personal dotfiles, scrambled together from the interwebz
Shell
4
star
13

krtmn

My own url shortener based on YOURLS
PHP
3
star
14

kremalicious2

WordPress theme & site files powering kremalicious.com
CSS
3
star
15

ipfs

๐Ÿ›ฐ A public IPFS node & gateway.
TypeScript
2
star
16

location

Microservice API endpoint to fetch and expose my location from nomadlist.com
TypeScript
2
star
17

hsresponsive

Basic responsive web design framework & templates for students of Medieninformatik at the Hochschule Harz
JavaScript
1
star
18

hastuzeit

Site of the student magazine at the University of Halle, Germany
PHP
1
star
19

ipfs-hosting

๐Ÿคนโ€โ™€๏ธ Playground exploring various ways of automating deployment of a static website to IPFS.
JavaScript
1
star
20

dribbble-chromeapp

Simple (unofficial) Chrome app/extension thingy for quickly opening the Dribbble web site from the New Tab page.
1
star