This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch docs/4.8.0-beta00017
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 9fdae2f4bebf3f8fc724e469ebd4493942dfcdfa
Author: Shad Storhaug <[email protected]>
AuthorDate: Wed Nov 6 17:36:18 2024 +0700

    Updated .htaccess copy and release procedure (#1010)
    
    * website: Fixed .htaccess and .gitattributes so they will reliably be 
copied to the build output by configuring them in docfx.json instead of using 
Powershell. Moved the starting location of those files to lucenetemplate 
(alongside doap_Lucene_Net.rdf and web.config).
    
    * .htaccess: Updated rewrite rule to redirect from either "absolute-latest" 
or "absoluteLatest" to the current version so we will match what NuGet does.
    
    * website: make-release.md: Added instructions to update the .htaccess file 
when updating the website for the release.
---
 websites/site/contributing/make-release.md        | 11 +++++++++--
 websites/site/docfx.json                          |  4 +++-
 websites/site/{ => lucenetemplate}/.gitattributes |  0
 websites/site/{ => lucenetemplate}/.htaccess      |  4 ++--
 websites/site/site.ps1                            |  8 --------
 5 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/websites/site/contributing/make-release.md 
b/websites/site/contributing/make-release.md
index 45823bd40..968b361d7 100644
--- a/websites/site/contributing/make-release.md
+++ b/websites/site/contributing/make-release.md
@@ -345,11 +345,17 @@ Remove the old releases from SVN under 
https://dist.apache.org/repos/dist/releas
     > [!IMPORTANT]
     > Only update the version if it's a new stable version.
 
+  - Update the `/websites/site/lucenetemplate/.htaccess` file to reflect the 
`latest` and `absoluteLatest` versions.
+    - `latest` should reflect the current release only if it is not a 
pre-release
+    - `absoluteLatest` should reflect the current release (whether pre-release 
or not)
+<br/>
+<br/>
   - Create a new release page in the `/websites/site/download`, in most cases 
it's easiest to just copy the previous release page.
     - Ensure the `uid` in the header is correct
     - Update all headers, status, release date to be correct
     - Ensure supported frameworks and packages section is accurate for the new 
release
-
+<br/>
+<br/>
   - Add the new release page to the `/websites/site/download/toc.yml` file
 
   - Add the new release version and release date to the 
`/websites/site/download/download.md` file
@@ -361,7 +367,8 @@ Remove the old releases from SVN under 
https://dist.apache.org/repos/dist/releas
 - Update the API Documentation with new release
 
   - Follow the instructions on how to 
[build](https://lucenenet.apache.org/contributing/documentation.html#api-docs), 
test and 
[publish](https://lucenenet.apache.org/contributing/documentation.html#publishing-the-docs)
 the docs.
-
+<br/>
+<br/>
 - Send announcement email 24 hours after the release (to ensure the mirrors 
have propagated the download locations)
 
   > [!IMPORTANT]
diff --git a/websites/site/docfx.json b/websites/site/docfx.json
index 1ec230641..e2df3096e 100644
--- a/websites/site/docfx.json
+++ b/websites/site/docfx.json
@@ -27,7 +27,9 @@
       },
       {
         "files": [
-          "doap_Lucene_Net.rdf"
+          "doap_Lucene_Net.rdf",
+          ".gitattributes",
+          ".htaccess"
         ],
         "src": "lucenetemplate"
       }
diff --git a/websites/site/.gitattributes 
b/websites/site/lucenetemplate/.gitattributes
similarity index 100%
rename from websites/site/.gitattributes
rename to websites/site/lucenetemplate/.gitattributes
diff --git a/websites/site/.htaccess b/websites/site/lucenetemplate/.htaccess
similarity index 91%
rename from websites/site/.htaccess
rename to websites/site/lucenetemplate/.htaccess
index 578948c69..05acaef2d 100644
--- a/websites/site/.htaccess
+++ b/websites/site/lucenetemplate/.htaccess
@@ -1,4 +1,4 @@
-# 
-----------------------------------------------------------------------------------
+# 
-----------------------------------------------------------------------------------
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -42,4 +42,4 @@ RewriteEngine On
 RewriteRule ^docs/latest/(.*)$ /docs/3.0.3/$1 [R=301,L]
 
 # Redirect /docs/absolute-latest/ to /docs/4.8.0-beta00017/
-RewriteRule ^docs/absolute-latest/(.*)$ /docs/4.8.0-beta00017/$1 [R=301,L]
\ No newline at end of file
+RewriteRule ^docs/absolute(-latest|Latest)/(.*)$ /docs/4.8.0-beta00017/$1 
[R=301,L]
diff --git a/websites/site/site.ps1 b/websites/site/site.ps1
index e6502c06d..dfff06872 100644
--- a/websites/site/site.ps1
+++ b/websites/site/site.ps1
@@ -58,14 +58,6 @@ if ($Clean) {
        Remove-Item (Join-Path -Path $SiteFolder "obj") -force -ErrorAction 
SilentlyContinue
 }
 
-if (!(Test-Path $SiteFolder)) {
-    New-Item $SiteFolder -ItemType Directory
-}
-
-# 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"
 

Reply via email to