diff --git a/README.md b/README.md index f0047aff9..130c059d1 100644 --- a/README.md +++ b/README.md @@ -115,14 +115,29 @@ can check the deploy job status on the Employees and post authors profile pages are now implemented to our Hugo blog. To add new profile page, follow steps below: +1. Add `name.surname.png` image to `blog/static/authors/` for profile image or + use `no-image.png` file in case of missing photo. 1. Add `_index.md` file to `blog/content/authors/name-surname/` with the content about the author (look at other profile pages for template). 1. Add `name.surname.json` file to `blog/data/authors/` with the content about the author for the post footer (look for other .json files for template) -1. Add `name.surname.png` image to `blog/static/authors/` for profile image. 1. After rebuilding the site (locally), new profile should be visible in the authors list page: +To enable visibility of your social media profiles or external services, use the +following header parameters with correct urls in the author's `_index.md` file: + +```yml +facebook: "https://www.facebook.com/piotr.krol.756859" +twitter: "https://twitter.com/pietrushnic" +linkedin: "https://pl.linkedin.com/in/krolpiotr" +reddit: "https://www.reddit.com/user/pietrushnic" +mastodon: "https://fosstodon.org/@pietrushnic" +matrix: "https://matrix.to/#/@pietrushnic:matrix.3mdeb.com" +github: "https://github.com/pietrushnic" +contribution: +``` + ## Good practices ### Broken links checker diff --git a/blog/content/authors/piotr-krol/_index.md b/blog/content/authors/piotr-krol/_index.md index c4e6f8960..07c918086 100644 --- a/blog/content/authors/piotr-krol/_index.md +++ b/blog/content/authors/piotr-krol/_index.md @@ -3,15 +3,36 @@ title: "Piotr Król" name: "Piotr Król" identifier: piotr.krol photo: "/authors/piotr.krol.jpg" -facebook: "https://pl-pl.facebook.com/3mdeb" -twitter: "https://twitter.com/3mdeb_com" +facebook: "https://www.facebook.com/piotr.krol.756859" +twitter: "https://twitter.com/pietrushnic" linkedin: "https://pl.linkedin.com/in/krolpiotr" +reddit: "https://www.reddit.com/user/pietrushnic" +mastodon: "https://fosstodon.org/@pietrushnic" +matrix: "https://matrix.to/#/@pietrushnic:matrix.3mdeb.com" github: "https://github.com/pietrushnic" contribution: --- -Founder and Embedded Systems Consultant at 3mdeb as well as freelance CTO of -Vitro Technology and CEO of LPN Plant. Passionate about building firmware that -enables advanced hardware features in modern products. Dedicated to customers -that treat embedded software security and upgradeability as forethought. Open -source firmware evangelist interested in platform security and trusted -computing. In favor of fixed price projects with a clear definition of success. + +I'm into open-source firmware, drawing inspiration from the classic hacker +ethos of collaborative innovation and transparency. At 3mdeb, we're excited +about our two main projects: Zarhus OS, an Embedded Linux distribution based on +Yocto, and Dasharo, a coreboot downstream. Both are about the value of open +development, embedded firmware resilience, platform security transparency, the +right to repair, and digital sovereignty. + +Community is at the center of our activity. By being involved in the Dasharo +Users Group, Dasharo Developers vPub, and events like the Qubes OS Summit, we +connect with others who share our passion for open-source. Our efforts with +OpenSecurityTraining2 reflect our commitment to sharing knowledge and improving +the open-source firmware ecosystem. + +As the founder of 3mdeb, my daily tasks go beyond managing the company. I am +also responsible for making important decisions about our products, such as +Zarhus OS and Dasharo, and developing valuable processes that establish a +foundation for projects we undertake for our clients. + +Outside work, I enjoy simple pleasures like chess, bridge, and reading. Nature, +especially the peace of the forest, is where I find solace. My interests in +theology, philosophy, and psychology keep me curious about the world. Whether +it's exploring new technologies or understanding complex ideas, I'm always +eager to learn and grow. diff --git a/blog/static/img/matrix.png b/blog/static/img/matrix.png deleted file mode 100644 index f0f686572..000000000 Binary files a/blog/static/img/matrix.png and /dev/null differ diff --git a/blog/themes/3mdeb/layouts/authors/list.html b/blog/themes/3mdeb/layouts/authors/list.html index 742b8bcf4..fe375b8fe 100644 --- a/blog/themes/3mdeb/layouts/authors/list.html +++ b/blog/themes/3mdeb/layouts/authors/list.html @@ -16,39 +16,35 @@
- {{ .Content }}
- - -
-
- {{ with or .Params.facebook .Params.twitter .Params.linkedin .Params.github }} -

Social media profiles

- {{ end }} - {{ with .Params.facebook }} -
- Follow {{ $.Params.name }} on Facebook -
- {{ end }} - {{ with .Params.twitter }} -
- Follow {{ $.Params.name }} on Twitter -
- {{ end }} - {{ with .Params.linkedin }} -
- Find {{ $.Params.name }} on LinkedIn -
- {{ end }} - {{ with .Params.github }}

- Check GitHub profile + {{ .Content }}

- {{ end }} - {{ with .Params.matrix }} -

- Check Matrix profile -

- {{ end }} +
+ {{ with or .Params.facebook .Params.twitter .Params.linkedin .Params.github .Params.matrix .Params.reddit .Params.mastodon}} + {{ end }} + {{ with .Params.facebook }} + + {{ end }} + {{ with .Params.twitter }} + + {{ end }} + {{ with .Params.linkedin }} + + {{ end }} + {{ with .Params.reddit }} + + {{ end }} + {{ with .Params.mastodon }} + + {{ end }} + {{ with .Params.github }} + + {{ end }} + {{ with .Params.matrix }} + + {{ end }} +
+
{{ with .Params.contribution }}

Contribution to open-source

diff --git a/blog/themes/3mdeb/static/img/mastodon.png b/blog/themes/3mdeb/static/img/mastodon.png new file mode 100644 index 000000000..ef3de1aa2 Binary files /dev/null and b/blog/themes/3mdeb/static/img/mastodon.png differ diff --git a/blog/themes/3mdeb/static/img/matrix.png b/blog/themes/3mdeb/static/img/matrix.png new file mode 100644 index 000000000..fa551048e Binary files /dev/null and b/blog/themes/3mdeb/static/img/matrix.png differ diff --git a/blog/themes/3mdeb/static/img/reddit.png b/blog/themes/3mdeb/static/img/reddit.png new file mode 100644 index 000000000..5807490d4 Binary files /dev/null and b/blog/themes/3mdeb/static/img/reddit.png differ diff --git a/scripts/docker-host-preview.sh b/scripts/docker-host-preview.sh new file mode 100755 index 000000000..c0e19617f --- /dev/null +++ b/scripts/docker-host-preview.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +# Check for the required parameters +if [ "$#" -ne 2 ]; then + echo "Usage: $0 " + exit 1 +fi + +# Function to clean up background processes when the script exits +cleanup() { + echo "Cleaning up..." + # Kill the inotifywait background process + kill $INOTIFY_PID +} + +# Set trap to call cleanup function when the script exits +trap cleanup exit + +REMOTE_USER_HOST="$1" +LOCAL_SRC_DIR="$2" # Local source directory provided as the second parameter +REMOTE_SRC_DIR="/tmp/website" +DOCKER_IMAGE="klakegg/hugo:0.105.0-ext-alpine" +DOCKER_PORT="1313" +REMOTE_HOST=$(echo $REMOTE_USER_HOST | cut -d '@' -f2) + +# Set DOCKER_HOST environment variable +export DOCKER_HOST="tcp://$REMOTE_HOST:2375" + +# Function to continuously sync local directory with remote directory +start_sync() { + ssh $REMOTE_USER_HOST "rm -rf $REMOTE_SRC_DIR" + rsync -avz --exclude='.git/' $LOCAL_SRC_DIR $REMOTE_USER_HOST:$REMOTE_SRC_DIR + inotifywait -m -r -e modify,create,delete --exclude '^\.git/' --format '%w%f' $LOCAL_SRC_DIR | while read file; do + # Check if the changed file is not inside .git directory + if [[ $file != *".git"* ]]; then + rsync -avz --exclude='.git/' $LOCAL_SRC_DIR $REMOTE_USER_HOST:$REMOTE_SRC_DIR + fi + done & + INOTIFY_PID=$! +} + +# Function to run Docker container on remote host +run_docker_container() { + docker run --rm -it -v $REMOTE_SRC_DIR/blog:/src -p $DOCKER_PORT:$DOCKER_PORT -u $(id -u) $DOCKER_IMAGE serve -b $REMOTE_HOST +} + +#!/bin/bash + +# Function to check if a command exists +command_exists() { + command -v "$1" >/dev/null 2>&1 +} + +# Check for required commands +if ! command_exists rsync; then + echo "rsync is not installed. Please install it." + exit 1 +fi + +if ! command_exists inotifywait; then + echo "inotify-tools is not installed. Please install it." + exit 1 +fi + +# Start continuous synchronization in the background +start_sync + +# Run Docker container +run_docker_container + +# After the Docker container exits, kill the background sync process +kill $!