Skip to content

Commit a378efe

Browse files
authored
Merge pull request #287 from NixOS/monitoring
Fix comments for css files
2 parents 3191c4a + 650d0a3 commit a378efe

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

modules/nixos-wiki/pages.nix

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,27 @@ in
9494
9595
# Read page content and add management comment
9696
content=$(cat "$wiki_file")
97-
content_with_comment="<!--
98-
This page is automatically managed through git repository synchronization.
97+
98+
# Define the comment content
99+
comment_text="This page is automatically managed through git repository synchronization.
99100
Do not edit this page directly on the wiki - changes will be overwritten.
100101
To edit this page, modify the file: $filename
101-
Source: https://github.com/NixOS/nixos-wiki-infra/blob/main/pages/$filename
102+
Source: https://github.com/NixOS/nixos-wiki-infra/blob/main/pages/$filename"
103+
104+
# Use appropriate comment syntax based on page type
105+
if [[ "$filename" == *.css.wiki ]]; then
106+
content_with_comment="/*
107+
$comment_text
108+
*/
109+
110+
$content"
111+
else
112+
content_with_comment="<!--
113+
$comment_text
102114
-->
103115
104116
$content"
117+
fi
105118
106119
# Edit the page using maintenance script (no --user means system maintenance user)
107120
echo "$content_with_comment" | ${config.services.phpfpm.pools.mediawiki.phpPackage}/bin/php \

targets/nixos-wiki.nixos.org/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pre_deployment_checks() {
5555

5656
# Check SSH connectivity
5757
log "Checking SSH connectivity to ${WIKI_HOST}..."
58-
if ! ssh -o ConnectTimeout=10 -o BatchMode=yes "${SSH_TARGET}" "echo 'SSH connection successful'"; then
58+
if ! ssh -o ConnectTimeout=10 "${SSH_TARGET}" "echo 'SSH connection successful'"; then
5959
error "Cannot establish SSH connection to ${WIKI_HOST}"
6060
return 1
6161
fi

0 commit comments

Comments
 (0)