From 4199b2e8507062c27ca5ec51646345f74a3faffc Mon Sep 17 00:00:00 2001 From: Nicolas MASSE Date: Tue, 22 Dec 2020 23:21:18 +0100 Subject: [PATCH] switch to page bundles for attachments --- archetypes/default.md | 3 ++ .../index.md} | 4 ++- .../pull.yaml | 0 .../blog/cleanup-playbook-3scale/cleanup.yaml | 0 .../index.md} | 4 ++- .../index.md} | 4 ++- .../openid-connect-issuer.png | Bin .../index.md} | 4 ++- .../uart-pins.jpeg | Bin .../control1.png | Bin .../control2.png | Bin .../control3.png | Bin .../if.png | Bin .../index.md} | 14 ++++----- .../thread-group.png | Bin .../udv.png | Bin .../index.md} | 4 ++- .../make-menuconfig.png | Bin .../change-qos.yaml | 0 .../index.md} | 4 ++- .../auth-ok.png | Bin .../auth.png | Bin .../authorized-domains.png | Bin .../create-credentials.png | Bin .../create-project.png | Bin .../index.md} | 27 ++++++++++-------- .../links.png | Bin .../oauth-consent.png | Bin .../project-name.png | Bin .../redirect-uri.png | Bin .../script-start.png | Bin .../script-url.png | Bin .../test-auth.sh | 0 .../github-add-webhook.png | Bin .../github-webhook.png | Bin .../index.md} | 10 ++++--- .../openshift-buildconfig-webhook.png | Bin .../openshift-rebuild.png | Bin .../hugo-screenshot.png | Bin .../index.md} | 4 ++- .../speaking/devoteam-tech-for-people-2018.md | 14 --------- .../2018-10-10-Devoteam-TechForPeople-1.jpg | Bin .../2018-10-10-Devoteam-TechForPeople-2.jpg | Bin .../2018-10-10-Devoteam-TechForPeople-3.jpg | Bin .../2018-10-10-Devoteam-TechForPeople-4.jpg | Bin .../devoteam-tech-for-people-2018/index.md | 16 +++++++++++ .../2018-10-21-RHTE-Award.jpg | Bin .../index.md} | 4 ++- .../2019-10-21-RHTE-Award.png | Bin .../index.md} | 4 ++- hugo | 12 ++++++++ layouts/shortcodes/attachedFigure.html | 12 ++++---- layouts/shortcodes/attachedFileLink.html | 4 +++ netlify.toml | 2 +- 54 files changed, 97 insertions(+), 53 deletions(-) rename content/english/blog/{airgap-openshift-installation-move-registry-created-using-oc-adm-release-mirror-between-environments.md => airgap-openshift-installation-move-registry-created-using-oc-adm-release-mirror-between-environments/index.md} (97%) rename {static => content/english}/blog/airgap-openshift-installation-move-registry-created-using-oc-adm-release-mirror-between-environments/pull.yaml (100%) rename {static => content/english}/blog/cleanup-playbook-3scale/cleanup.yaml (100%) rename content/english/blog/{cleanup-playbook-3scale.md => cleanup-playbook-3scale/index.md} (97%) rename content/english/blog/{configure-redhat-sso-3scale-cli.md => configure-redhat-sso-3scale-cli/index.md} (96%) rename {static => content/english}/blog/configure-redhat-sso-3scale-cli/openid-connect-issuer.png (100%) rename content/english/blog/{install-openwrt-raspberry-pi.md => install-openwrt-raspberry-pi/index.md} (98%) rename {static => content/english}/blog/install-openwrt-raspberry-pi/uart-pins.jpeg (100%) rename {static => content/english}/blog/jmeter-assess-software-performances/control1.png (100%) rename {static => content/english}/blog/jmeter-assess-software-performances/control2.png (100%) rename {static => content/english}/blog/jmeter-assess-software-performances/control3.png (100%) rename {static => content/english}/blog/jmeter-assess-software-performances/if.png (100%) rename content/english/blog/{jmeter-assess-software-performances.md => jmeter-assess-software-performances/index.md} (94%) rename {static => content/english}/blog/jmeter-assess-software-performances/thread-group.png (100%) rename {static => content/english}/blog/jmeter-assess-software-performances/udv.png (100%) rename content/english/blog/{nginx-with-tls-on-openwrt.md => nginx-with-tls-on-openwrt/index.md} (99%) rename {static => content/english}/blog/nginx-with-tls-on-openwrt/make-menuconfig.png (100%) rename {static => content/english}/blog/use-ansible-to-manage-the-qos-of-your-openshift-workload/change-qos.yaml (100%) rename content/english/blog/{use-ansible-to-manage-the-qos-of-your-openshift-workload.md => use-ansible-to-manage-the-qos-of-your-openshift-workload/index.md} (97%) rename {static => content/english}/blog/use-google-account-openid-connect-provider/auth-ok.png (100%) rename {static => content/english}/blog/use-google-account-openid-connect-provider/auth.png (100%) rename {static => content/english}/blog/use-google-account-openid-connect-provider/authorized-domains.png (100%) rename {static => content/english}/blog/use-google-account-openid-connect-provider/create-credentials.png (100%) rename {static => content/english}/blog/use-google-account-openid-connect-provider/create-project.png (100%) rename content/english/blog/{use-google-account-openid-connect-provider.md => use-google-account-openid-connect-provider/index.md} (85%) rename {static => content/english}/blog/use-google-account-openid-connect-provider/links.png (100%) rename {static => content/english}/blog/use-google-account-openid-connect-provider/oauth-consent.png (100%) rename {static => content/english}/blog/use-google-account-openid-connect-provider/project-name.png (100%) rename {static => content/english}/blog/use-google-account-openid-connect-provider/redirect-uri.png (100%) rename {static => content/english}/blog/use-google-account-openid-connect-provider/script-start.png (100%) rename {static => content/english}/blog/use-google-account-openid-connect-provider/script-url.png (100%) rename {static => content/english}/blog/use-google-account-openid-connect-provider/test-auth.sh (100%) rename {static => content/english}/blog/writing-workshop-instructions-with-hugo-deploy-openshift/github-add-webhook.png (100%) rename {static => content/english}/blog/writing-workshop-instructions-with-hugo-deploy-openshift/github-webhook.png (100%) rename content/english/blog/{writing-workshop-instructions-with-hugo-deploy-openshift.md => writing-workshop-instructions-with-hugo-deploy-openshift/index.md} (94%) rename {static => content/english}/blog/writing-workshop-instructions-with-hugo-deploy-openshift/openshift-buildconfig-webhook.png (100%) rename {static => content/english}/blog/writing-workshop-instructions-with-hugo-deploy-openshift/openshift-rebuild.png (100%) rename {static => content/english}/blog/writing-workshop-instructions-with-hugo/hugo-screenshot.png (100%) rename content/english/blog/{writing-workshop-instructions-with-hugo.md => writing-workshop-instructions-with-hugo/index.md} (98%) delete mode 100644 content/english/speaking/devoteam-tech-for-people-2018.md rename {static/speaking => content/english/speaking/devoteam-tech-for-people-2018}/2018-10-10-Devoteam-TechForPeople-1.jpg (100%) rename {static/speaking => content/english/speaking/devoteam-tech-for-people-2018}/2018-10-10-Devoteam-TechForPeople-2.jpg (100%) rename {static/speaking => content/english/speaking/devoteam-tech-for-people-2018}/2018-10-10-Devoteam-TechForPeople-3.jpg (100%) rename {static/speaking => content/english/speaking/devoteam-tech-for-people-2018}/2018-10-10-Devoteam-TechForPeople-4.jpg (100%) create mode 100644 content/english/speaking/devoteam-tech-for-people-2018/index.md rename {static/speaking => content/english/speaking/red-hat-tech-exchange-2018}/2018-10-21-RHTE-Award.jpg (100%) rename content/english/speaking/{red-hat-tech-exchange-2018.md => red-hat-tech-exchange-2018/index.md} (77%) rename {static/speaking => content/english/speaking/red-hat-tech-exchange-2019}/2019-10-21-RHTE-Award.png (100%) rename content/english/speaking/{red-hat-tech-exchange-2019.md => red-hat-tech-exchange-2019/index.md} (84%) create mode 100644 layouts/shortcodes/attachedFileLink.html diff --git a/archetypes/default.md b/archetypes/default.md index 0e07e13..9d4ceea 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -6,6 +6,9 @@ opensource: - project1 topics: - topic1 +resources: +#- src: '*.yaml' +#- src: '*.png' --- Headline. diff --git a/content/english/blog/airgap-openshift-installation-move-registry-created-using-oc-adm-release-mirror-between-environments.md b/content/english/blog/airgap-openshift-installation-move-registry-created-using-oc-adm-release-mirror-between-environments/index.md similarity index 97% rename from content/english/blog/airgap-openshift-installation-move-registry-created-using-oc-adm-release-mirror-between-environments.md rename to content/english/blog/airgap-openshift-installation-move-registry-created-using-oc-adm-release-mirror-between-environments/index.md index 9e82b1e..6a64690 100644 --- a/content/english/blog/airgap-openshift-installation-move-registry-created-using-oc-adm-release-mirror-between-environments.md +++ b/content/english/blog/airgap-openshift-installation-move-registry-created-using-oc-adm-release-mirror-between-environments/index.md @@ -7,6 +7,8 @@ opensource: - Skopeo topics: - Containers +resources: +- src: '*.yaml' --- Some customers, especially large banks, have very tight security requirements. @@ -145,7 +147,7 @@ Finally, skopeo is called to download each image to */tmp/oci_registry*. with_items: '{{ images }}' ``` -The complete playbook [is available here](pull.yaml) and can be run as follow. +The complete playbook [is available here]({{< attachedFileLink src="pull.yaml" >}}) and can be run as follow. ```sh ansible-playbook pull.yaml -e token=$TOKEN diff --git a/static/blog/airgap-openshift-installation-move-registry-created-using-oc-adm-release-mirror-between-environments/pull.yaml b/content/english/blog/airgap-openshift-installation-move-registry-created-using-oc-adm-release-mirror-between-environments/pull.yaml similarity index 100% rename from static/blog/airgap-openshift-installation-move-registry-created-using-oc-adm-release-mirror-between-environments/pull.yaml rename to content/english/blog/airgap-openshift-installation-move-registry-created-using-oc-adm-release-mirror-between-environments/pull.yaml diff --git a/static/blog/cleanup-playbook-3scale/cleanup.yaml b/content/english/blog/cleanup-playbook-3scale/cleanup.yaml similarity index 100% rename from static/blog/cleanup-playbook-3scale/cleanup.yaml rename to content/english/blog/cleanup-playbook-3scale/cleanup.yaml diff --git a/content/english/blog/cleanup-playbook-3scale.md b/content/english/blog/cleanup-playbook-3scale/index.md similarity index 97% rename from content/english/blog/cleanup-playbook-3scale.md rename to content/english/blog/cleanup-playbook-3scale/index.md index a1a4682..1738dad 100644 --- a/content/english/blog/cleanup-playbook-3scale.md +++ b/content/english/blog/cleanup-playbook-3scale/index.md @@ -7,6 +7,8 @@ opensource: topics: - API Management - IT Automation +resources: +- src: '*.yaml' --- If you are running integration tests embedding 3scale or are doing a lot of 3scale demos, you might sooner or later **have plenty of services declared in the 3scale Admin console**, which could reveal difficult to work with. @@ -59,7 +61,7 @@ export THREESCALE_TOKEN="$(oc get secret system-seed -o go-template --template=' Fetch the cleanup playbook. ```sh -curl -Lo cleanup.yaml {{< baseurl >}}blog/cleanup-playbook-3scale/cleanup.yaml +curl -Lo cleanup.yaml {{< attachedFileLink src="cleanup.yaml" >}} ``` ## Cleanup 3scale diff --git a/content/english/blog/configure-redhat-sso-3scale-cli.md b/content/english/blog/configure-redhat-sso-3scale-cli/index.md similarity index 96% rename from content/english/blog/configure-redhat-sso-3scale-cli.md rename to content/english/blog/configure-redhat-sso-3scale-cli/index.md index 721b5b1..8b0c3e9 100644 --- a/content/english/blog/configure-redhat-sso-3scale-cli.md +++ b/content/english/blog/configure-redhat-sso-3scale-cli/index.md @@ -6,6 +6,8 @@ opensource: - Keycloak topics: - OpenID Connect +resources: +- src: '*.png' --- [3scale API Management](https://3scale.github.io/) can be used in conjunction with [Red Hat SSO](https://access.redhat.com/products/red-hat-single-sign-on) / [Keycloak](https://www.keycloak.org/) to secure APIs managed by 3scale using the OpenID Connect protocol. @@ -96,7 +98,7 @@ You can use the following URL for the **OpenID Connect Issuer** (replace $SSO_HO https://zync:s3cr3t@$SSO_HOSTNAME/auth/realms/3scale ``` -![openid-connect-issuer](openid-connect-issuer.png) +{{< figure src="openid-connect-issuer.png" title="OpenID Connect Issuer settings in the 3scale Admin Portal." >}} Or when [deploying an API in 3scale with the 3scale toolbox](https://developers.redhat.com/blog/2019/07/29/3scale-toolbox-deploy-an-api-from-the-cli/), you can use: diff --git a/static/blog/configure-redhat-sso-3scale-cli/openid-connect-issuer.png b/content/english/blog/configure-redhat-sso-3scale-cli/openid-connect-issuer.png similarity index 100% rename from static/blog/configure-redhat-sso-3scale-cli/openid-connect-issuer.png rename to content/english/blog/configure-redhat-sso-3scale-cli/openid-connect-issuer.png diff --git a/content/english/blog/install-openwrt-raspberry-pi.md b/content/english/blog/install-openwrt-raspberry-pi/index.md similarity index 98% rename from content/english/blog/install-openwrt-raspberry-pi.md rename to content/english/blog/install-openwrt-raspberry-pi/index.md index a64270c..3882e5c 100644 --- a/content/english/blog/install-openwrt-raspberry-pi.md +++ b/content/english/blog/install-openwrt-raspberry-pi/index.md @@ -5,6 +5,8 @@ opensource: - OpenWRT topics: - Embedded Systems +resources: +- src: '*.jpeg' --- [OpenWRT](https://openwrt.org/) is a Linux distribution for embedded systems. @@ -70,7 +72,7 @@ screen /dev/ttyUSB0 115200 You then need to connect the VIN, GND, TXD and RXD wires to the correct GPIO pins of your Raspberry PI. -![GPIO UART pins](uart-pins.jpeg) +{{< figure src="uart-pins.jpeg" title="The UART Pins of the Raspberry PI 3" >}} Power-on your Raspberry PI, wait a couple seconds and press enter to display the OpenWRT prompt. diff --git a/static/blog/install-openwrt-raspberry-pi/uart-pins.jpeg b/content/english/blog/install-openwrt-raspberry-pi/uart-pins.jpeg similarity index 100% rename from static/blog/install-openwrt-raspberry-pi/uart-pins.jpeg rename to content/english/blog/install-openwrt-raspberry-pi/uart-pins.jpeg diff --git a/static/blog/jmeter-assess-software-performances/control1.png b/content/english/blog/jmeter-assess-software-performances/control1.png similarity index 100% rename from static/blog/jmeter-assess-software-performances/control1.png rename to content/english/blog/jmeter-assess-software-performances/control1.png diff --git a/static/blog/jmeter-assess-software-performances/control2.png b/content/english/blog/jmeter-assess-software-performances/control2.png similarity index 100% rename from static/blog/jmeter-assess-software-performances/control2.png rename to content/english/blog/jmeter-assess-software-performances/control2.png diff --git a/static/blog/jmeter-assess-software-performances/control3.png b/content/english/blog/jmeter-assess-software-performances/control3.png similarity index 100% rename from static/blog/jmeter-assess-software-performances/control3.png rename to content/english/blog/jmeter-assess-software-performances/control3.png diff --git a/static/blog/jmeter-assess-software-performances/if.png b/content/english/blog/jmeter-assess-software-performances/if.png similarity index 100% rename from static/blog/jmeter-assess-software-performances/if.png rename to content/english/blog/jmeter-assess-software-performances/if.png diff --git a/content/english/blog/jmeter-assess-software-performances.md b/content/english/blog/jmeter-assess-software-performances/index.md similarity index 94% rename from content/english/blog/jmeter-assess-software-performances.md rename to content/english/blog/jmeter-assess-software-performances/index.md index d7cc5b7..97c5a09 100644 --- a/content/english/blog/jmeter-assess-software-performances.md +++ b/content/english/blog/jmeter-assess-software-performances/index.md @@ -6,7 +6,7 @@ opensource: topics: - Performance testing resources: -- '**.png' +- '*.png' --- One of my side projects (the [Telegram Photo Bot](https://github.com/nmasse-itix/Telegram-Photo-Album-Bot)), have some performance issues that I will have to tackle. @@ -104,7 +104,7 @@ http { My first measure on the control (nginx) gave strange results. -{{< figure src="control1.png" title="First measure gave results too low to be representative of nginx's performances." >}} +{{< attachedFigure src="control1.png" title="First measure gave results too low to be representative of nginx's performances." >}} Less than 30 tps, even on an old ARM board, is definitely too low to be representative of nginx's performances. Using [Wireshark](https://www.wireshark.org/), I discovered that JMeter did not established [Keep-Alive connections](https://sqa.stackexchange.com/questions/38211/re-using-the-tcp-connections-with-jmeter-like-a-real-browser). @@ -137,13 +137,13 @@ httpclient.reset_state_on_thread_group_iteration=false With Keep-Alive enabled, the 1200 tps are much more inline with the known performance level of nginx. Except there is a performance drop every 10-15 seconds that is not expected. -{{< figure src="control2.png" title="Second measure shows a periodic performance drop." >}} +{{< attachedFigure src="control2.png" title="Second measure shows a periodic performance drop." >}} Using Wireshark, I discovered that during those performance drops, there are [TCP packets retransmissions](https://wiki.wireshark.org/DuplicatePackets). At that time, my Macbook Pro hosting the injector was connected **using Wifi**. I switched to a good old Ethernet cable, and this time the results on the control were as expected. -{{< figure src="control3.png" title="Third measure is ok." >}} +{{< attachedFigure src="control3.png" title="Third measure is ok." >}} As a conclusion, always have a control in your experience! @@ -151,7 +151,7 @@ As a conclusion, always have a control in your experience! To build my JMeter Test Plan, I started by adding a **User Defined Variables** component that holds all the settings related to lab environment (DNS names, ports, tokens, etc.). -{{< figure src="udv.png" title="JMeter User Defined Variables" >}} +{{< attachedFigure src="udv.png" title="JMeter User Defined Variables" >}} I added a variable named **scenario** whose value will be passed to JMeter from the CLI. This enables me to run all my experiments automatically from a script, one after another. @@ -163,12 +163,12 @@ ${__P(parameter-name,default-value)} I configured a **Thread Group** based on the **jp@gc - Ultimate Thread Group** with five concurrent users. -{{< figure src="thread-group.png" title="JMeter Thread Group" >}} +{{< attachedFigure src="thread-group.png" title="JMeter Thread Group" >}} And finally, a **Loop** component with three **If Controllers** underneath. Each **If Controller** holds an **HTTP Probe** configured for the target scenario. -{{< figure src="if.png" title="JMeter If Controller" >}} +{{< attachedFigure src="if.png" title="JMeter If Controller" >}} The If Controllers are defined with a **jexl3** expression, asserting the value of the **scenario** variable. diff --git a/static/blog/jmeter-assess-software-performances/thread-group.png b/content/english/blog/jmeter-assess-software-performances/thread-group.png similarity index 100% rename from static/blog/jmeter-assess-software-performances/thread-group.png rename to content/english/blog/jmeter-assess-software-performances/thread-group.png diff --git a/static/blog/jmeter-assess-software-performances/udv.png b/content/english/blog/jmeter-assess-software-performances/udv.png similarity index 100% rename from static/blog/jmeter-assess-software-performances/udv.png rename to content/english/blog/jmeter-assess-software-performances/udv.png diff --git a/content/english/blog/nginx-with-tls-on-openwrt.md b/content/english/blog/nginx-with-tls-on-openwrt/index.md similarity index 99% rename from content/english/blog/nginx-with-tls-on-openwrt.md rename to content/english/blog/nginx-with-tls-on-openwrt/index.md index ed2b1f9..90933f5 100644 --- a/content/english/blog/nginx-with-tls-on-openwrt.md +++ b/content/english/blog/nginx-with-tls-on-openwrt/index.md @@ -6,6 +6,8 @@ opensource: - nginx topics: - Embedded Systems +resources: +- '*.png' --- In the article "[Install OpenWRT on your Raspberry PI](../install-openwrt-raspberry-pi/)", I explained how to install OpenWRT on a Raspberry PI and the first steps as an OpenWRT user. @@ -85,7 +87,7 @@ Enter **Global Build Settings** and: * Press space to unset **Select all userspace packages by default** * Leave **Cryptographically sign packages** set -![make menuconfig](make-menuconfig.png) +{{< attachedFigure src="make-menuconfig.png" title="Parameters to activate in your make menuconfig" >}} Go back to the root menu. diff --git a/static/blog/nginx-with-tls-on-openwrt/make-menuconfig.png b/content/english/blog/nginx-with-tls-on-openwrt/make-menuconfig.png similarity index 100% rename from static/blog/nginx-with-tls-on-openwrt/make-menuconfig.png rename to content/english/blog/nginx-with-tls-on-openwrt/make-menuconfig.png diff --git a/static/blog/use-ansible-to-manage-the-qos-of-your-openshift-workload/change-qos.yaml b/content/english/blog/use-ansible-to-manage-the-qos-of-your-openshift-workload/change-qos.yaml similarity index 100% rename from static/blog/use-ansible-to-manage-the-qos-of-your-openshift-workload/change-qos.yaml rename to content/english/blog/use-ansible-to-manage-the-qos-of-your-openshift-workload/change-qos.yaml diff --git a/content/english/blog/use-ansible-to-manage-the-qos-of-your-openshift-workload.md b/content/english/blog/use-ansible-to-manage-the-qos-of-your-openshift-workload/index.md similarity index 97% rename from content/english/blog/use-ansible-to-manage-the-qos-of-your-openshift-workload.md rename to content/english/blog/use-ansible-to-manage-the-qos-of-your-openshift-workload/index.md index 684ee0b..20a412d 100644 --- a/content/english/blog/use-ansible-to-manage-the-qos-of-your-openshift-workload.md +++ b/content/english/blog/use-ansible-to-manage-the-qos-of-your-openshift-workload/index.md @@ -6,6 +6,8 @@ opensource: - Ansible topics: - IT Automation +resources: +- src: '*.yaml' --- As I was administering my OpenShift cluster, I found out that I had a too @@ -192,6 +194,6 @@ blacklist of critical namespaces that should not be touched. when: obj.namespace not in namespace_blacklist {{< / highlight >}} -You can find the complete playbook [here](change-qos.yaml). Of course, it is +You can find the complete playbook [here]({{< attachedFileLink src="change-qos.yaml" >}}). Of course, it is very rough and would need to more work to be used on a daily basis but for a single use this is sufficient. diff --git a/static/blog/use-google-account-openid-connect-provider/auth-ok.png b/content/english/blog/use-google-account-openid-connect-provider/auth-ok.png similarity index 100% rename from static/blog/use-google-account-openid-connect-provider/auth-ok.png rename to content/english/blog/use-google-account-openid-connect-provider/auth-ok.png diff --git a/static/blog/use-google-account-openid-connect-provider/auth.png b/content/english/blog/use-google-account-openid-connect-provider/auth.png similarity index 100% rename from static/blog/use-google-account-openid-connect-provider/auth.png rename to content/english/blog/use-google-account-openid-connect-provider/auth.png diff --git a/static/blog/use-google-account-openid-connect-provider/authorized-domains.png b/content/english/blog/use-google-account-openid-connect-provider/authorized-domains.png similarity index 100% rename from static/blog/use-google-account-openid-connect-provider/authorized-domains.png rename to content/english/blog/use-google-account-openid-connect-provider/authorized-domains.png diff --git a/static/blog/use-google-account-openid-connect-provider/create-credentials.png b/content/english/blog/use-google-account-openid-connect-provider/create-credentials.png similarity index 100% rename from static/blog/use-google-account-openid-connect-provider/create-credentials.png rename to content/english/blog/use-google-account-openid-connect-provider/create-credentials.png diff --git a/static/blog/use-google-account-openid-connect-provider/create-project.png b/content/english/blog/use-google-account-openid-connect-provider/create-project.png similarity index 100% rename from static/blog/use-google-account-openid-connect-provider/create-project.png rename to content/english/blog/use-google-account-openid-connect-provider/create-project.png diff --git a/content/english/blog/use-google-account-openid-connect-provider.md b/content/english/blog/use-google-account-openid-connect-provider/index.md similarity index 85% rename from content/english/blog/use-google-account-openid-connect-provider.md rename to content/english/blog/use-google-account-openid-connect-provider/index.md index efb31c7..cab065c 100644 --- a/content/english/blog/use-google-account-openid-connect-provider.md +++ b/content/english/blog/use-google-account-openid-connect-provider/index.md @@ -3,6 +3,9 @@ title: "Use your Google Account as an OpenID Connect provider" date: 2020-03-27T00:00:00+02:00 topics: - OpenID Connect +resources: +- src: '*.png' +- src: '*.sh' --- We have passwords everywhere: to unlock our computer, to reach our inbox, to login as root on our Raspberry PI, etc. @@ -47,15 +50,15 @@ First, connect to the [Google Developer Console](https://console.developers.goog Click **Create Project**. -![create project](create-project.png) +{{< attachedFigure src="create-project.png" title="Click 'Create Project'." >}} Fill-in the **Project name** (free choice). The location does not matter. Click **Create**. -![project name](project-name.png) +{{< attachedFigure src="project-name.png" title="Fill-in the 'Project name'. Click 'Create'." >}} Click **OAuth Consent screen**. If you are a Google Suite user, select **Internal**. If you are a regular GMail user, select **External**. Click **Create**. -![oauth-consent](oauth-consent.png) +{{< attachedFigure src="oauth-consent.png" title="The OAuth Consent screen." >}} Choose an application name (free choice). Leave the default scopes. @@ -63,15 +66,15 @@ Add your personal domain to the list of **Authorized Domains**. For instance, if your target service is at *raspberry-pi.example.test*, add **example.test**. **DO NOT FORGET to press Enter!** -![authorized-domains](authorized-domains.png) +{{< attachedFigure src="authorized-domains.png" title="Add your personal domain to the list of Authorized Domains." >}} Fill-in the **Application Homepage Link** and **Application Privacy Policy Link** (free choices). Click **Save**. -![links](links.png) +{{< attachedFigure src="links.png" title="Fill-in the links." >}} Click **Credentials**. Select **+ Create Credentials**, then **OAuth Client ID**. -![create-credentials](create-credentials.png) +{{< attachedFigure src="create-credentials.png" title="Create the OAuth credentials." >}} Under **Application type**, select **Web Application**. Choose a name for your application (free choice). @@ -83,7 +86,7 @@ To be able to do so, we need to add a special Redirect URI: **http://localhost:6 Click **Create**. -![redirect-uri](redirect-uri.png) +{{< attachedFigure src="redirect-uri.png" title="Fill-in the Redirect URI." >}} Google generated a **Client ID** and **Client Secret** for you. Keep them somewhere safe! @@ -94,7 +97,7 @@ There are several open source tools to test your OpenID Connect setup but a very Download the following script and make it executable. ```sh -curl -o test-auth.sh {{< baseurl >}}blog/use-google-account-openid-connect-provider/test-auth.sh +curl -o test-auth.sh {{< attachedFileLink src="test-auth.sh" >}} chmod 755 test-auth.sh ``` @@ -113,15 +116,15 @@ Now, run this script! The script generates a URL that you need to copy and paste in your web browser. -![script-start](script-start.png) +{{< attachedFigure src="script-start.png" title="The script generates a URL that you need to copy and paste in your web browser." >}} If you are not yet logged in, Google asks you to authenticate. -![auth](auth.png) +{{< attachedFigure src="auth.png" title="If you are not yet logged in, Google asks you to authenticate." >}} Once logged in or if you are already logged in, you are redirected to the fake Redirect URI we registered earlier. -![auth-ok](auth-ok.png) +{{< attachedFigure src="auth-ok.png" title="You are redirected to the fake Redirect URI we registered earlier" >}} We registered a fake Redirect URI so that we could play each part of the OpenID Connect exchange manually. **So, if you see an error message from your web browser saying that it cannot connect to the target service: THIS IS EXPECTED FOR OUR TEST.** @@ -131,7 +134,7 @@ Once the browser is redirected at `http://localhost:666/stop-here`, copy the red Remember that the Authorization Code is very short lived. So, be quick! -![script-url](script-url.png) +{{< attachedFigure src="script-url.png" title="Paste the Redirect URI." >}} The script contacts the Authorization Server to get an Access Token from the Authorization Code captured in the Redirect URI. diff --git a/static/blog/use-google-account-openid-connect-provider/links.png b/content/english/blog/use-google-account-openid-connect-provider/links.png similarity index 100% rename from static/blog/use-google-account-openid-connect-provider/links.png rename to content/english/blog/use-google-account-openid-connect-provider/links.png diff --git a/static/blog/use-google-account-openid-connect-provider/oauth-consent.png b/content/english/blog/use-google-account-openid-connect-provider/oauth-consent.png similarity index 100% rename from static/blog/use-google-account-openid-connect-provider/oauth-consent.png rename to content/english/blog/use-google-account-openid-connect-provider/oauth-consent.png diff --git a/static/blog/use-google-account-openid-connect-provider/project-name.png b/content/english/blog/use-google-account-openid-connect-provider/project-name.png similarity index 100% rename from static/blog/use-google-account-openid-connect-provider/project-name.png rename to content/english/blog/use-google-account-openid-connect-provider/project-name.png diff --git a/static/blog/use-google-account-openid-connect-provider/redirect-uri.png b/content/english/blog/use-google-account-openid-connect-provider/redirect-uri.png similarity index 100% rename from static/blog/use-google-account-openid-connect-provider/redirect-uri.png rename to content/english/blog/use-google-account-openid-connect-provider/redirect-uri.png diff --git a/static/blog/use-google-account-openid-connect-provider/script-start.png b/content/english/blog/use-google-account-openid-connect-provider/script-start.png similarity index 100% rename from static/blog/use-google-account-openid-connect-provider/script-start.png rename to content/english/blog/use-google-account-openid-connect-provider/script-start.png diff --git a/static/blog/use-google-account-openid-connect-provider/script-url.png b/content/english/blog/use-google-account-openid-connect-provider/script-url.png similarity index 100% rename from static/blog/use-google-account-openid-connect-provider/script-url.png rename to content/english/blog/use-google-account-openid-connect-provider/script-url.png diff --git a/static/blog/use-google-account-openid-connect-provider/test-auth.sh b/content/english/blog/use-google-account-openid-connect-provider/test-auth.sh similarity index 100% rename from static/blog/use-google-account-openid-connect-provider/test-auth.sh rename to content/english/blog/use-google-account-openid-connect-provider/test-auth.sh diff --git a/static/blog/writing-workshop-instructions-with-hugo-deploy-openshift/github-add-webhook.png b/content/english/blog/writing-workshop-instructions-with-hugo-deploy-openshift/github-add-webhook.png similarity index 100% rename from static/blog/writing-workshop-instructions-with-hugo-deploy-openshift/github-add-webhook.png rename to content/english/blog/writing-workshop-instructions-with-hugo-deploy-openshift/github-add-webhook.png diff --git a/static/blog/writing-workshop-instructions-with-hugo-deploy-openshift/github-webhook.png b/content/english/blog/writing-workshop-instructions-with-hugo-deploy-openshift/github-webhook.png similarity index 100% rename from static/blog/writing-workshop-instructions-with-hugo-deploy-openshift/github-webhook.png rename to content/english/blog/writing-workshop-instructions-with-hugo-deploy-openshift/github-webhook.png diff --git a/content/english/blog/writing-workshop-instructions-with-hugo-deploy-openshift.md b/content/english/blog/writing-workshop-instructions-with-hugo-deploy-openshift/index.md similarity index 94% rename from content/english/blog/writing-workshop-instructions-with-hugo-deploy-openshift.md rename to content/english/blog/writing-workshop-instructions-with-hugo-deploy-openshift/index.md index b8086b9..5381951 100644 --- a/content/english/blog/writing-workshop-instructions-with-hugo-deploy-openshift.md +++ b/content/english/blog/writing-workshop-instructions-with-hugo-deploy-openshift/index.md @@ -4,6 +4,8 @@ date: 2019-02-27T00:00:00+02:00 opensource: - Hugo - OpenShift +resources: +- '*.png' --- This is the third part of my series covering how to @@ -166,25 +168,25 @@ First, get the GitHub Webhook URL of your BuildConfig: - Open the **Configuration** tab - Copy the **GitHub Webhook URL** -![The BuildConfig on OpenShift](openshift-buildconfig-webhook.png) +{{< attachedFigure src="openshift-buildconfig-webhook.png" title="The BuildConfig on OpenShift." >}} Then, go on your GitHub repository and add a webhook: - Go to **Settings** > **Webhooks** - Click **Add webhook** -![Add a webhook on GitHub](github-add-webhook.png) +{{< attachedFigure src="github-add-webhook.png" title="Add a webhook on GitHub." >}} - Paste your Webhook URL in the **Payload URL** field - Select `application/json` in the **Content type** dropdown list - Check **Disable** in the **SSL verification** section if your OpenShift console has a self-signed certificate - Click **Add webhook** -![The GitHub webhook](github-webhook.png) +{{< attachedFigure src="github-webhook.png" title="The GitHub webhook." >}} Try to push some changes to your GitHub repository and see OpenShift rebuilding and deploying your website! -![OpenShift rebuilding and redeploying your website](openshift-rebuild.png) +{{< attachedFigure src="openshift-rebuild.png" title="OpenShift rebuilding and redeploying your website" >}} ## Conclusion diff --git a/static/blog/writing-workshop-instructions-with-hugo-deploy-openshift/openshift-buildconfig-webhook.png b/content/english/blog/writing-workshop-instructions-with-hugo-deploy-openshift/openshift-buildconfig-webhook.png similarity index 100% rename from static/blog/writing-workshop-instructions-with-hugo-deploy-openshift/openshift-buildconfig-webhook.png rename to content/english/blog/writing-workshop-instructions-with-hugo-deploy-openshift/openshift-buildconfig-webhook.png diff --git a/static/blog/writing-workshop-instructions-with-hugo-deploy-openshift/openshift-rebuild.png b/content/english/blog/writing-workshop-instructions-with-hugo-deploy-openshift/openshift-rebuild.png similarity index 100% rename from static/blog/writing-workshop-instructions-with-hugo-deploy-openshift/openshift-rebuild.png rename to content/english/blog/writing-workshop-instructions-with-hugo-deploy-openshift/openshift-rebuild.png diff --git a/static/blog/writing-workshop-instructions-with-hugo/hugo-screenshot.png b/content/english/blog/writing-workshop-instructions-with-hugo/hugo-screenshot.png similarity index 100% rename from static/blog/writing-workshop-instructions-with-hugo/hugo-screenshot.png rename to content/english/blog/writing-workshop-instructions-with-hugo/hugo-screenshot.png diff --git a/content/english/blog/writing-workshop-instructions-with-hugo.md b/content/english/blog/writing-workshop-instructions-with-hugo/index.md similarity index 98% rename from content/english/blog/writing-workshop-instructions-with-hugo.md rename to content/english/blog/writing-workshop-instructions-with-hugo/index.md index 88f6748..b5a566e 100644 --- a/content/english/blog/writing-workshop-instructions-with-hugo.md +++ b/content/english/blog/writing-workshop-instructions-with-hugo/index.md @@ -3,6 +3,8 @@ title: "Writing workshop instructions with Hugo" date: 2019-02-20T00:00:00+02:00 opensource: - Hugo +resources: +- '*.png' --- In my professional life, I often have to lead workshops with customers or @@ -199,7 +201,7 @@ git push -u origin master Congratulations! You now have your training instructions neatly organised and clearly presented. Maintenance and collaboration have been greatly simplified! -![Screenshot of our mini-training](hugo-screenshot.png) +{{< attachedFigure src="hugo-screenshot.png" title="Screenshot of our mini-training." >}} In this first part of the series, we presented a very light introduction to Hugo and its application to workshop instructions. Be sure to read [part 2: Writing workshop instructions with Hugo, with variables in your content](../writing-workshop-instructions-with-hugo-variables/) to discover advanced usages. diff --git a/content/english/speaking/devoteam-tech-for-people-2018.md b/content/english/speaking/devoteam-tech-for-people-2018.md deleted file mode 100644 index c8caf5b..0000000 --- a/content/english/speaking/devoteam-tech-for-people-2018.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: "Devoteam #TechForPeople 2018" -date: 2018-10-10T00:00:00+02:00 -draft: false ---- - -The 10th Septembre 2018, I co-presented a session named _"No API, No Future"_ -in which I exhibited the Red Hat's API Lifecycle Automation. The event -`#TechForPeople` was organized by Devoteam. - -![Devoteam #TechForPeople](/speaking/2018-10-10-Devoteam-TechForPeople-1.jpg) -![Devoteam #TechForPeople](/speaking/2018-10-10-Devoteam-TechForPeople-2.jpg) -![Devoteam #TechForPeople](/speaking/2018-10-10-Devoteam-TechForPeople-3.jpg) -![Devoteam #TechForPeople](/speaking/2018-10-10-Devoteam-TechForPeople-4.jpg) diff --git a/static/speaking/2018-10-10-Devoteam-TechForPeople-1.jpg b/content/english/speaking/devoteam-tech-for-people-2018/2018-10-10-Devoteam-TechForPeople-1.jpg similarity index 100% rename from static/speaking/2018-10-10-Devoteam-TechForPeople-1.jpg rename to content/english/speaking/devoteam-tech-for-people-2018/2018-10-10-Devoteam-TechForPeople-1.jpg diff --git a/static/speaking/2018-10-10-Devoteam-TechForPeople-2.jpg b/content/english/speaking/devoteam-tech-for-people-2018/2018-10-10-Devoteam-TechForPeople-2.jpg similarity index 100% rename from static/speaking/2018-10-10-Devoteam-TechForPeople-2.jpg rename to content/english/speaking/devoteam-tech-for-people-2018/2018-10-10-Devoteam-TechForPeople-2.jpg diff --git a/static/speaking/2018-10-10-Devoteam-TechForPeople-3.jpg b/content/english/speaking/devoteam-tech-for-people-2018/2018-10-10-Devoteam-TechForPeople-3.jpg similarity index 100% rename from static/speaking/2018-10-10-Devoteam-TechForPeople-3.jpg rename to content/english/speaking/devoteam-tech-for-people-2018/2018-10-10-Devoteam-TechForPeople-3.jpg diff --git a/static/speaking/2018-10-10-Devoteam-TechForPeople-4.jpg b/content/english/speaking/devoteam-tech-for-people-2018/2018-10-10-Devoteam-TechForPeople-4.jpg similarity index 100% rename from static/speaking/2018-10-10-Devoteam-TechForPeople-4.jpg rename to content/english/speaking/devoteam-tech-for-people-2018/2018-10-10-Devoteam-TechForPeople-4.jpg diff --git a/content/english/speaking/devoteam-tech-for-people-2018/index.md b/content/english/speaking/devoteam-tech-for-people-2018/index.md new file mode 100644 index 0000000..7f2a512 --- /dev/null +++ b/content/english/speaking/devoteam-tech-for-people-2018/index.md @@ -0,0 +1,16 @@ +--- +title: "Devoteam #TechForPeople 2018" +date: 2018-10-10T00:00:00+02:00 +draft: false +resources: +- '*.png' +--- + +The 10th Septembre 2018, I co-presented a session named _"No API, No Future"_ +in which I exhibited the Red Hat's API Lifecycle Automation. The event +`#TechForPeople` was organized by Devoteam. + +{{< attachedFigure src="2018-10-10-Devoteam-TechForPeople-1.jpg" >}} +{{< attachedFigure src="2018-10-10-Devoteam-TechForPeople-2.jpg" >}} +{{< attachedFigure src="2018-10-10-Devoteam-TechForPeople-3.jpg" >}} +{{< attachedFigure src="2018-10-10-Devoteam-TechForPeople-4.jpg" >}} diff --git a/static/speaking/2018-10-21-RHTE-Award.jpg b/content/english/speaking/red-hat-tech-exchange-2018/2018-10-21-RHTE-Award.jpg similarity index 100% rename from static/speaking/2018-10-21-RHTE-Award.jpg rename to content/english/speaking/red-hat-tech-exchange-2018/2018-10-21-RHTE-Award.jpg diff --git a/content/english/speaking/red-hat-tech-exchange-2018.md b/content/english/speaking/red-hat-tech-exchange-2018/index.md similarity index 77% rename from content/english/speaking/red-hat-tech-exchange-2018.md rename to content/english/speaking/red-hat-tech-exchange-2018/index.md index ffca08e..ad8ea44 100644 --- a/content/english/speaking/red-hat-tech-exchange-2018.md +++ b/content/english/speaking/red-hat-tech-exchange-2018/index.md @@ -2,6 +2,8 @@ title: "Red Hat Tech Exchange 2018" date: 2018-09-21T00:00:00+02:00 draft: false +resources: +- '*.jpg' --- From the 17th to 21th Septembre 2018, I co-presented two sessions: @@ -12,4 +14,4 @@ From the 17th to 21th Septembre 2018, I co-presented two sessions: For the session _An API Journey: from mock to deployment_, we received an award based on the amazing feedbacks from the public! -![We received our award, on-stage!](/speaking/2018-10-21-RHTE-Award.jpg) +{{< attachedFigure src="2018-10-21-RHTE-Award.jpg" title="We received our award, on-stage!" >}} diff --git a/static/speaking/2019-10-21-RHTE-Award.png b/content/english/speaking/red-hat-tech-exchange-2019/2019-10-21-RHTE-Award.png similarity index 100% rename from static/speaking/2019-10-21-RHTE-Award.png rename to content/english/speaking/red-hat-tech-exchange-2019/2019-10-21-RHTE-Award.png diff --git a/content/english/speaking/red-hat-tech-exchange-2019.md b/content/english/speaking/red-hat-tech-exchange-2019/index.md similarity index 84% rename from content/english/speaking/red-hat-tech-exchange-2019.md rename to content/english/speaking/red-hat-tech-exchange-2019/index.md index 290f322..98b16d0 100644 --- a/content/english/speaking/red-hat-tech-exchange-2019.md +++ b/content/english/speaking/red-hat-tech-exchange-2019/index.md @@ -2,6 +2,8 @@ title: "Red Hat Tech Exchange 2019" date: 2019-10-21T00:00:00+02:00 draft: false +resources: +- '*.png' --- During the three Red Hat Tech Exchange sessions (Americas, EMEA and APAC), I presented two sessions: @@ -11,4 +13,4 @@ During the three Red Hat Tech Exchange sessions (Americas, EMEA and APAC), I pre The session _Leverage the power of open source communities to manage your APIs_ has been the second best voted session in RHTE APAC! -![I received an award!](/speaking/2019-10-21-RHTE-Award.png) +{{< attachedFigure src="2019-10-21-RHTE-Award.png" title="I received an award!" >}} diff --git a/hugo b/hugo index 7d7c293..5a127ea 100755 --- a/hugo +++ b/hugo @@ -6,6 +6,8 @@ trap cleanup SIGINT SIGTERM ERR EXIT function cleanup() { trap - SIGINT SIGTERM ERR EXIT + # On exit, remove any symbolic link in content/french that points + # to content/english find content/french -type l -print0 | while IFS= read -r -d $'\0' filename; do if realpath "$filename" | grep -E "^$PWD/" > /dev/null; then rm -f "$filename" @@ -13,12 +15,22 @@ function cleanup() { done } +# First, try to find page bundles. In that case, link the directory +(cd content/english && find * -type f -name 'index.md') | while read file; do + if [ ! -e "content/french/$file" ]; then + d="$(dirname $file)" + ln -s ../../../content/english/$d content/french/$d + fi +done + +# Then, find the regular pages and link the files directly. (cd content/english && find * -type f -name '*.md') | while read file; do if [ ! -e "content/french/$file" ]; then ln -s ../../../content/english/$file content/french/$file fi done +# Remove dangling links find content/french -xtype l -exec rm -f {} \; hugo gen chromastyles --style=borland > static/css/chroma.css diff --git a/layouts/shortcodes/attachedFigure.html b/layouts/shortcodes/attachedFigure.html index a02f8fa..8cc3f04 100644 --- a/layouts/shortcodes/attachedFigure.html +++ b/layouts/shortcodes/attachedFigure.html @@ -1,11 +1,11 @@ -{{ $filename := .Get "src" }} -{{ $image := .Page.Resources.GetMatch (printf "%s" $filename) }} +{{- $filename := .Get "src" -}} +{{- $image := .Page.Resources.GetMatch (printf "%s" $filename) -}}
- - {{ with .Get "title" }} + + {{- with .Get "title" }}
- {{ . }} + {{- . -}}
- {{ end }} + {{- end }}
\ No newline at end of file diff --git a/layouts/shortcodes/attachedFileLink.html b/layouts/shortcodes/attachedFileLink.html new file mode 100644 index 0000000..7d90ae4 --- /dev/null +++ b/layouts/shortcodes/attachedFileLink.html @@ -0,0 +1,4 @@ + +{{- $filename := .Get "src" -}} +{{- $file := .Page.Resources.GetMatch (printf "%s" $filename) -}} +{{- $file.Permalink -}} \ No newline at end of file diff --git a/netlify.toml b/netlify.toml index 4d77cc5..e8bc6a4 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,6 @@ [build] publish = "public" -command = "./hugo" +command = "./hugo --baseURL https://www.itix.fr" [build.environment] # Global HUGO_VERSION = "0.42"