File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 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 \
You can’t perform that action at this time.
0 commit comments