Skip to content

Merge 27 dead short posts into stronger pages, with 301s (batch 2) - #2096

Merged
bobbyonmagic merged 4 commits into
mainfrom
content/consolidate-low-traffic-2
Nov 6, 2026
Merged

bobbyonmagic merged 4 commits into
mainfrom
content/consolidate-low-traffic-2

Conversation

@bobbyonmagic

Copy link
Copy Markdown
Collaborator

Batch 2 of the dead-post consolidation: 27 short 2024-2025 posts, each with 0 Google impressions in 90 days and 0 Bing clicks in 2026 (3,738 Bing impressions combined). The useful part of each post moved into an existing page on the same topic, and the old URL gets a 301. No new pages.

Old post Merged into Bing clicks 2026
change-commit-author-single /posts/change-author-multiple-commits-git 0
how-to-make-git-forget-tracked-file-in-gitignore /posts/remove-file-from-git-keep-local 0
how-to-stash-changes-in-git /posts/stash-single-file-git 0
how-to-modify-existing-unpushed-commit-messages /guides/introduction-to-git/08-history 0
modify-specific-commit-git /guides/introduction-to-git/08-history 0
how-to-discard-unstaged-changes-in-git /guides/introduction-to-git/03-tracking-changes 0
how-to-remove-local-untracked-files-git /guides/introduction-to-git/03-tracking-changes 0
bash-redirect-append-stdout-stderr /posts/redirect-all-output-to-file-bash 0
format-date-yyyy-mm-dd-in-shell-script /posts/get-current-date-time-and-custom-commands 0
set-variable-command-output-bash /guides/introduction-to-bash/09-bash-tools 0
concatenate-string-variables-bash /guides/introduction-to-bash/04-bash-variables 0
split-string-delimiter-bash /guides/introduction-to-bash/04-bash-variables 0
extract-filename-extension-bash /guides/introduction-to-bash/04-bash-variables 0
kill-process-running-on-port-linux /posts/how-to-free-up-tcp-port 0
command-line-for-looking-at-specific-port /posts/how-to-free-up-tcp-port 0
kill-processes-by-partial-name /guides/introduction-to-linux/07-process-management 0
finding-local-ip-addresses-using-pythons-stdlib /posts/how-to-get-local-ip-address 0
docker-see-image-contents /posts/exploring-docker-container-file-system 0
delete-all-local-docker-images /posts/remove-old-unused-docker-images 0
enter-docker-container-new-tty /posts/how-do-i-run-a-command-on-an-already-existing-docker-container 0
how-to-attach-detach-docker-process /posts/how-do-i-run-a-command-on-an-already-existing-docker-container 0
copy-docker-images-between-hosts-withouta-repository /guides/introduction-to-docker/03-working-with-docker-images 0
expose-multiple-ports-docker /posts/forward-host-port-to-docker-container 0
how-to-decode-a-kubernetes-secret /guides/introduction-to-kubernetes/06-configmaps-and-secrets 0
terraform-concatenate-lists-concat-function /posts/terraform-variables-loops-and-outputs 0
how-to-create-an-ssh-key-in-terraform /guides/introduction-to-terraform/10-best-practices-and-production-patterns 0
terraform-add-ssh-key-gcp-instance /guides/introduction-to-terraform/10-best-practices-and-production-patterns 0

The last two are the SSH key pair that batch 1 left out. They now share one section, "SSH Keys for Servers", under "Keep Secrets Out of State".

Method (same as batch 1)

  1. Merge each post into one existing page on the same topic: indexed if possible, never a top-25 Bing page.
  2. Move only what the target lacks, as a short section with the direct answer first. Run every command and paste the real output.
  3. Delete the post and its cover, drop its PNG and SVG cover redirects, and add a static 301 above the dynamic rules.
  4. Point inbound links at the new section anchors. Bump updatedAt only on pages that got content.

Fixes found on the way

  • redirect-all-output-to-file-bash had a crontab example with &>>. Cron runs /bin/sh (dash on Debian and Ubuntu), where &>> backgrounds the job and leaves the log empty. It now uses >> file 2>&1.
  • how-to-free-up-tcp-port recommended lsof -ti :8080 | xargs kill -9. That also kills clients connected to the port, so it now uses -sTCP:LISTEN.

Checks

  • _redirects: 1,620 static and 9 dynamic rules, down from 1,643 static (27 post redirects in, 50 cover redirects out). No static rule after a dynamic one, no chains, every target exists.
  • Tests: redirects-order plus 17 content test files pass (6,032 tests). Every interactive fence in the 44 changed files renders as a widget, and all 363 internal heading anchors in content resolve, apart from 7 older in-page anchors in three posts this PR does not touch. The internal link checker finds no broken /posts/ or /guides/ links.
  • Commands: Git 2.39, bash 5.2, coreutils 9.1, procps-ng, psmisc, Python 3.11 and Terraform 1.15.8 (tls provider) ran on the Pi. Docker Engine 28.0.4, kind v0.33.0 with Kubernetes 1.37.0, and the Terraform plans (AWS provider 6.72.0, Google provider 7.46.2, placeholder credentials) ran on GitHub Actions. The logs are on the consolidation-batch-2 branch of post-command-checks.

Each post's useful part now lives in an existing page on the same topic,
with a 301 from the old URL:

- change-commit-author-single -> change-author-multiple-commits-git, a
  section for the last commit: --author keeps the author date,
  --reset-author does not; rebase --exec without -i; includeIf
- how-to-make-git-forget-tracked-file-in-gitignore ->
  remove-file-from-git-keep-local, git ls-files -ci --exclude-standard,
  check-ignore needs --no-index for tracked files, and what the
  rm -r --cached . recipe also stages
- how-to-stash-changes-in-git -> stash-single-file-git, stash and pop
  everything, pop --index, --staged and stash branch
- how-to-modify-existing-unpushed-commit-messages and
  modify-specific-commit-git -> Git guide part 8, which commits are not
  pushed yet (@{u}..) and rebase -i @{u}
- how-to-discard-unstaged-changes-in-git and
  how-to-remove-local-untracked-files-git -> Git guide part 3, restore :/
  plus git clean -n, -d, -x and -X

Every command was run with Git 2.39. Links to the old posts now point at
the new sections.
- bash-redirect-append-stdout-stderr -> redirect-all-output-to-file-bash,
  appending each stream to its own file, and why &>> fails in sh (dash):
  it backgrounds the command and leaves the log empty. The post's own
  crontab example used &>>, now >> file 2>&1
- format-date-yyyy-mm-dd-in-shell-script ->
  get-current-date-time-and-custom-commands, %F, date -I, printf '%(%F)T'
  and GNU date arithmetic, including 31 January + 1 month = 3 March
- set-variable-command-output-bash -> Bash guide part 9, local hides the
  exit status, and mapfile from a here-string gives one empty element
- concatenate-string-variables-bash, split-string-delimiter-bash and
  extract-filename-extension-bash -> Bash guide part 4: ${name}_x, +=
  with declare -i, names without an extension, trailing empty fields and
  multi-character delimiters
- kill-process-running-on-port-linux and
  command-line-for-looking-at-specific-port -> how-to-free-up-tcp-port:
  ss filters instead of grep, sudo for other users' sockets, and why
  lsof -ti :8080 | xargs kill -9 also kills connected clients
- kill-processes-by-partial-name -> Linux guide part 7, the 15-character
  name limit and pkill -f matching the shell that runs it
- finding-local-ip-addresses-using-pythons-stdlib -> how-to-get-local-ip-address,
  a standard library interface list, what gethostbyname really returns,
  and ipaddress flags for 100.64.0.0/10

Commands ran with bash 5.2, coreutils 9.1, procps-ng 4.0.2, psmisc 23.6
and Python 3.11 on a Raspberry Pi; the interface listing ran on a GitHub
Actions runner (post-command-checks, consolidation-batch-2).
…he variables post

- how-to-decode-a-kubernetes-secret -> Kubernetes guide part 6, every key
  at once with a Go template or jq, and the newline that echo puts into
  a Secret value
- terraform-concatenate-lists-concat-function ->
  terraform-variables-loops-and-outputs: distinct, setunion, concat(x...)
  vs flatten, and concat() on a null variable (nullable = false)
- how-to-create-an-ssh-key-in-terraform and terraform-add-ssh-key-gcp-instance
  -> Terraform guide part 10, under Keep Secrets Out of State: pass only
  the public key (aws_key_pair, GCE ssh-keys metadata), tls_private_key
  leaves the private key in state three times, an ephemeral key cannot
  feed a normal argument, and the project metadata and OS Login traps

Secret outputs come from kind v0.33.0 with Kubernetes 1.37.0, the
Terraform plans from Terraform 1.15.8 with AWS provider 6.72.0 and
Google provider 7.46.2 on a GitHub Actions runner (placeholder
credentials, nothing created). The tls_private_key and terraform console
checks ran on a Raspberry Pi.
- docker-see-image-contents -> exploring-docker-container-file-system,
  images without a shell: docker create plus export or cp, and
  --entrypoint for one command
- delete-all-local-docker-images -> remove-old-unused-docker-images, the
  order that works (remove containers, then prune -a), and the three
  ways docker rmi $(docker images -q) fails
- enter-docker-container-new-tty and how-to-attach-detach-docker-process
  -> how-do-i-run-a-command-on-an-already-existing-docker-container,
  exec vs attach: detach keys need -it, and without -it Ctrl+C or a
  SIGTERM to the client stops the container; with --sig-proxy=false the
  client ignored both signals on Engine 28.0.4
- copy-docker-images-between-hosts-withouta-repository -> Docker guide
  part 3, save | gzip | ssh docker load, the repository digest that a
  load drops, and why export/import does not copy an image
- expose-multiple-ports-docker -> forward-host-port-to-docker-container,
  range lengths, a host range for one container port, several ports in
  one EXPOSE line and -P

The outputs were recorded on GitHub Actions runners (Docker Engine
28.0.4) with the consolidation-batch-2 scripts in post-command-checks,
logs included. The cover images and the PNG and SVG cover redirects of
the removed posts are gone too.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying devops-daily with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8229282
Status: ✅  Deploy successful!
Preview URL: https://9fc616bb.devops-daily.pages.dev
Branch Preview URL: https://content-consolidate-low-traf.devops-daily.pages.dev

View logs

@bobbyonmagic
bobbyonmagic merged commit 2c8cc46 into main Nov 6, 2026
3 checks passed
@bobbyonmagic
bobbyonmagic deleted the content/consolidate-low-traffic-2 branch November 6, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant