You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by rc...@apache.org on 2024/09/30 21:31:25 UTC
(lucenenet) branch master updated: bugfix/website force .htaccess LF endings & introduce .gitattributes file
This is an automated email from the ASF dual-hosted git repository.
rclabo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git
The following commit(s) were added to refs/heads/master by this push:
new e13721c99 bugfix/website force .htaccess LF endings & introduce .gitattributes file
e13721c99 is described below
commit e13721c999378f2e0fb6c5a4a681dbd9d71d1f98
Author: rclabo <rc...@users.noreply.github.com>
AuthorDate: Mon Sep 30 17:05:04 2024 -0400
bugfix/website force .htaccess LF endings & introduce .gitattributes file
---
websites/site/.gitattributes | 1 +
websites/site/.htaccess | 2 ++
websites/site/site.ps1 | 3 ++-
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/websites/site/.gitattributes b/websites/site/.gitattributes
new file mode 100644
index 000000000..7803b1f16
--- /dev/null
+++ b/websites/site/.gitattributes
@@ -0,0 +1 @@
+.htaccess text eol=lf
diff --git a/websites/site/.htaccess b/websites/site/.htaccess
index 15c6b3d0c..96d4584f7 100644
--- a/websites/site/.htaccess
+++ b/websites/site/.htaccess
@@ -31,6 +31,8 @@
# main website content into the API documentation always points to the appropriate
# version, with [R=301] signaling permanent redirects and [L] preventing further
# rule processing.
+#
+# Note: This file is line ending sensitive. MUST use LF line endings.
RewriteEngine On
diff --git a/websites/site/site.ps1 b/websites/site/site.ps1
index 699e74c36..e180a8697 100644
--- a/websites/site/site.ps1
+++ b/websites/site/site.ps1
@@ -68,8 +68,9 @@ if ($Clean) {
Remove-Item (Join-Path -Path $SiteFolder "obj") -force -ErrorAction SilentlyContinue
}
-# Copy the .htaccess file to the _site directory after cleaning
+# Copy the .htaccess & .gitattributes files to the _site directory after cleaning
Copy-Item -Path (Join-Path -Path $SiteFolder ".htaccess") -Destination (Join-Path -Path $SiteFolder "_site\.htaccess") -Force
+Copy-Item -Path (Join-Path -Path $SiteFolder ".gitattributes") -Destination (Join-Path -Path $SiteFolder "_site\.gitattributes") -Force
$DocFxJson = Join-Path -Path $SiteFolder "docfx.json"
$DocFxLog = Join-Path -Path $SiteFolder "obj\docfx.log"