From 09c15633120af999c8434edac6a3e76b6a022ad1 Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Wed, 6 Nov 2024 16:23:55 +0700 Subject: [PATCH 1/3] 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). --- websites/site/docfx.json | 4 +++- websites/site/{ => lucenetemplate}/.gitattributes | 0 websites/site/{ => lucenetemplate}/.htaccess | 0 websites/site/site.ps1 | 8 -------- 4 files changed, 3 insertions(+), 9 deletions(-) rename websites/site/{ => lucenetemplate}/.gitattributes (100%) rename websites/site/{ => lucenetemplate}/.htaccess (100%) diff --git a/websites/site/docfx.json b/websites/site/docfx.json index 1ec2306416..e2df3096ee 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 100% rename from websites/site/.htaccess rename to websites/site/lucenetemplate/.htaccess diff --git a/websites/site/site.ps1 b/websites/site/site.ps1 index e6502c06d0..dfff06872c 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" From 789b6c24648926f621153b33b511fa7a18aae0a6 Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Wed, 6 Nov 2024 16:32:22 +0700 Subject: [PATCH 2/3] .htaccess: Updated rewrite rule to redirect from either "absolute-latest" or "absoluteLatest" to the current version so we will match what NuGet does. --- websites/site/lucenetemplate/.htaccess | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/websites/site/lucenetemplate/.htaccess b/websites/site/lucenetemplate/.htaccess index 578948c699..05acaef2d5 100644 --- a/websites/site/lucenetemplate/.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] From 9f2b76b417bd89e829c081a96694903a37152c3b Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Wed, 6 Nov 2024 17:22:18 +0700 Subject: [PATCH 3/3] 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 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/websites/site/contributing/make-release.md b/websites/site/contributing/make-release.md index 45823bd409..968b361d7c 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) +
+
- 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 - +
+
- 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. - +
+
- Send announcement email 24 hours after the release (to ensure the mirrors have propagated the download locations) > [!IMPORTANT]