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

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


The following commit(s) were added to refs/heads/docs-may by this push:
     new 55537dd  Adds new link to the docs, updates remaining docs for 
publishing the docs/website
55537dd is described below

commit 55537dd12beb2065d0fd0ab66cc56e316ae7ea57
Author: Shannon <[email protected]>
AuthorDate: Wed May 27 15:26:38 2020 +1000

    Adds new link to the docs, updates remaining docs for publishing the 
docs/website
---
 .../EnvironmentVariableInlineRule.cs               | 44 +++++++++-------------
 src/docs/LuceneDocsPlugins/LuceneNoteBlockToken.cs |  8 ----
 src/dotnet/tools/lucene-cli/docs/index.md          |  2 +-
 websites/site/contributing/documentation.md        | 23 +++++++++--
 websites/site/docs.md                              |  1 +
 5 files changed, 40 insertions(+), 38 deletions(-)

diff --git a/src/docs/LuceneDocsPlugins/EnvironmentVariableInlineRule.cs 
b/src/docs/LuceneDocsPlugins/EnvironmentVariableInlineRule.cs
index 9082817..63a2c44 100644
--- a/src/docs/LuceneDocsPlugins/EnvironmentVariableInlineRule.cs
+++ b/src/docs/LuceneDocsPlugins/EnvironmentVariableInlineRule.cs
@@ -24,41 +24,33 @@ using Microsoft.DocAsCode.MarkdownLite;
 
 namespace LuceneDocsPlugins
 {
-    internal static class RegexExtentions
-    {
-        public static string NotEmpty(this Match match, int index1, int index2)
-        {
-            if (match.Groups.Count > index1 && 
!string.IsNullOrEmpty(match.Groups[index1].Value))
-            {
-                return match.Groups[index1].Value;
-            }
-            return match.Groups[index2].Value;
-        }
-    }
-
     public class EnvironmentVariableInlineRule : IMarkdownRule
     {
+        // give it a name
         public string Name => "EnvVarToken";
+
+        // define my regex to match
         private static readonly Regex _envVarRegex = new 
Regex(@"^\[EnvVar:(\w+?)\]", RegexOptions.Compiled);
 
+        // process the match
         public IMarkdownToken TryMatch(IMarkdownParser parser, 
IMarkdownParsingContext context)
-        {           
+        {
+            // TODO: This does not process this token from within a code block 
like
+
+            // ```
+            // dotnet tool install lucene-cli -g --version [EnvVar: 
LuceneNetVersion]
+            // ```
+
             var match = _envVarRegex.Match(context.CurrentMarkdown);
-            if (match.Length == 0)
-            {
-                return null;
-            }
+            if (match.Length == 0) return null;
+
             var envVar = match.Groups[1].Value;
             var text = Environment.GetEnvironmentVariable(envVar);
-            if (text == null)
-            {
-                return null;
-            }
-            else
-            {
-                var sourceInfo = context.Consume(match.Length);
-                return new MarkdownTextToken(this, parser.Context, text, 
sourceInfo);
-            }
+            if (text == null) return null;
+
+            // 'eat' the characters of the current markdown token so they anr
+            var sourceInfo = context.Consume(match.Length);
+            return new MarkdownTextToken(this, parser.Context, text, 
sourceInfo);
         }
     }
 }
\ No newline at end of file
diff --git a/src/docs/LuceneDocsPlugins/LuceneNoteBlockToken.cs 
b/src/docs/LuceneDocsPlugins/LuceneNoteBlockToken.cs
index d0a4096..f98041e 100644
--- a/src/docs/LuceneDocsPlugins/LuceneNoteBlockToken.cs
+++ b/src/docs/LuceneDocsPlugins/LuceneNoteBlockToken.cs
@@ -43,12 +43,4 @@ namespace LuceneDocsPlugins
         public SourceInfo SourceInfo { get; }
     }
 
-    public class EnvironmentVariableBlockToken : IMarkdownToken
-    {
-        public IMarkdownRule Rule { get; }
-
-        public IMarkdownContext Context { get; }
-
-        public SourceInfo SourceInfo { get; }
-    }
 }
\ No newline at end of file
diff --git a/src/dotnet/tools/lucene-cli/docs/index.md 
b/src/dotnet/tools/lucene-cli/docs/index.md
index 766ebd9..303f5d7 100644
--- a/src/dotnet/tools/lucene-cli/docs/index.md
+++ b/src/dotnet/tools/lucene-cli/docs/index.md
@@ -11,7 +11,7 @@ The Lucene.Net command line interface (CLI) is a new 
cross-platform toolchain wi
 Perform a one-time install of the lucene-cli tool using the following dotnet 
CLI command:
 
 ```
-dotnet tool install lucene-cli -g --version 4.8.0-beta00007
+dotnet tool install lucene-cli -g --version [EnvVar:LuceneNetVersion]
 ```
 
 You may then use the lucene-cli tool to analyze and update Lucene.Net indexes 
and use its demos.
diff --git a/websites/site/contributing/documentation.md 
b/websites/site/contributing/documentation.md
index 5dc5134..97f91f2 100644
--- a/websites/site/contributing/documentation.md
+++ b/websites/site/contributing/documentation.md
@@ -38,6 +38,14 @@ The file/folder structure is within `/websites/site`:
 * `tools/*` - during the build process some tools will be downloaded which are 
stored here
 * `_site` - this is the exported static site that is generated
 
+### Deploy the website
+
+* The website is deployed via git
+* Checkout the Git repo that hosts the documentation: 
https://github.com/apache/lucenenet-site/tree/asf-site _(ensure you have 
`asf-site` branch checked out, not `master`)_
+* Copy the build output of the website to the root. The build output will be 
all of the files in the `/websites/site/_site` in your main lucene.net checked 
out Git repository. 
+* Commit and push these changes
+* The new version of the website will be live. If the amount of new files 
committed is large, the new files may take some time to become live. 
+
 ## API Docs
 
 ### Build script
@@ -74,7 +82,7 @@ The process overview is:
 
 We don't want to manually change the converted resulting markdown files 
(`.md`) because they would get overwritten again when the conversion process is 
re-executed. Therefor to fix any formatting issues or customized output of the 
project docs, these customizations/fixes/tweaks are built directly in to the 
conversion process itself in the `JavaDocToMarkdownConverter.csproj` project.
 
-### Step by step
+### Building the docs
 
 * Checkout the Lucene.Net release tag to build the docs against
 * Execute the `./src/docs/convert.ps1` script and enter the current Lucene 
version to convert from. 
@@ -96,5 +104,14 @@ We don't want to manually change the converted resulting 
markdown files (`.md`)
 * Create a new folder in this repo: `/docs/[Version]`, for example: 
`/docs/4.8.0-beta00008`
 * Copy the build output of the documentation site to this new folder. The 
build output will be all of the files in the `/websites/apidocs/_site` in your 
main lucene.net checked out Git repository. 
 * Commit and push these changes
-* The new version documentation will be live. Due to the amount of new files 
committed, the new files may take up to 20 minutes to become live. 
-* Create a named branch on the main 
[`lucenenet`](https://github.com/apache/lucenenet) repository with the same 
name: `docs/[Version]`, for example `docs/4.8.0-beta00008` based on commit of 
the latest (if any) changes made to the docs in the `lucenenet` repository. 
This branch is used for linking to on the API docs "Improve this Doc" button.
\ No newline at end of file
+* The new version documentation will be live. Due to the amount of new files 
committed, the new files may take up to 60 minutes to become live. 
+* Create a named branch on the main 
[`lucenenet`](https://github.com/apache/lucenenet) repository with the same 
name: `docs/[Version]`, for example `docs/4.8.0-beta00008` based on commit of 
the latest (if any) changes made to the docs in the `lucenenet` repository. 
This branch is used for linking to on the API docs "Improve this Doc" button.
+* The last step is to update the website which is manual process currently. 
+  * In the `/websites/site/download` folder there should be a document per 
release. It's normally fine to copy the document of the latest release for the 
same major version. For a new major version some modifications may be needed. 
+  * Ensure the correct version number is listed in the header and the nuget 
download snippet.
+  * Update the `Status` and `Released` heading information. 
+  * Ensure the download links are correct.
+  * Update the `/websites/site/download/toc.yml` file to include a reference 
to the new page which should maintain descending version order.
+  * Update the `/websites/site/docs.md` file and add a link to the new 
documentation for the current version which should maintain descending version 
order.
+  * [Build the website](#website) and test locally, then deploy the changes
+  
diff --git a/websites/site/docs.md b/websites/site/docs.md
index 17b6f24..96bd4d2 100644
--- a/websites/site/docs.md
+++ b/websites/site/docs.md
@@ -11,6 +11,7 @@ Lucene.Net Documentation
 
 The API docs are slightly different between versions, each one is listed below:
 
+* [4.8.0-beta00008](https://lucenenet.apache.org/docs/4.8.0-beta00008/)
 * [4.8.0-beta00007](https://lucenenet.apache.org/docs/4.8.0-beta00007/)
 * [4.8.0-beta00001 -> 
4.8.0-beta00006](https://lucenenet.apache.org/docs/4.8.0-beta00005/)
 

Reply via email to