From 4278bf966e21732e051d0bad9a9c3b6e5df598bf Mon Sep 17 00:00:00 2001 From: Nikolaj Brask-Nielsen Date: Sat, 14 Sep 2024 00:21:03 +0200 Subject: [PATCH] feat: Partial docfx fix - Missing some plugins --- .../.idea.DocumentationTools/.idea/.gitignore | 13 ++ .../.idea.DocumentationTools/.idea/.name | 1 + .../.idea/encodings.xml | 4 + .../.idea/indexLayout.xml | 8 ++ .../.idea/material_theme_project_new.xml | 13 ++ .../.idea.DocumentationTools/.idea/misc.xml | 22 ++++ .../.idea.DocumentationTools/.idea/vcs.xml | 6 + .../EnvironmentVariableProcessor.cs | 45 +++++++ .../EnvironmentVariableUtil.cs | 41 +++--- .../LuceneDfmEngineCustomizer.cs | 124 +++++++++--------- .../LuceneDocsPlugins.csproj | 32 ++--- .../LuceneDocsPlugins/LuceneNoteBlockRule.cs | 82 ++++++------ .../LuceneDocsPlugins/LuceneNoteBlockToken.cs | 74 +++++------ .../LuceneNoteTokenRendererPart.cs | 90 ++++++------- .../LuceneDocsPlugins/RendererPartProvider.cs | 72 +++++----- src/dotnet/tools/lucene-cli/docs/index.md | 2 +- .../partials/_head.liquid | 10 +- .../partials/_logo.liquid | 6 +- .../partials/_scripts.liquid | 6 +- .../partials/head.tmpl.partial | 8 +- .../partials/logo.tmpl.partial | 4 +- .../partials/scripts.tmpl.partial | 6 +- .../LuceneTemplate/partials/logo.tmpl.partial | 2 +- websites/apidocs/docfx.analysis-common.json | 12 +- websites/apidocs/docfx.analysis-kuromoji.json | 14 +- .../apidocs/docfx.analysis-morfologik.json | 16 ++- websites/apidocs/docfx.analysis-opennlp.json | 14 +- websites/apidocs/docfx.analysis-phonetic.json | 16 ++- websites/apidocs/docfx.analysis-smartcn.json | 16 ++- websites/apidocs/docfx.analysis-stempel.json | 16 ++- websites/apidocs/docfx.benchmark.json | 16 ++- websites/apidocs/docfx.classification.json | 16 ++- websites/apidocs/docfx.codecs.json | 18 +-- websites/apidocs/docfx.core.json | 17 ++- websites/apidocs/docfx.demo.json | 18 +-- websites/apidocs/docfx.expressions.json | 20 +-- websites/apidocs/docfx.facet.json | 20 +-- websites/apidocs/docfx.global.json | 8 +- websites/apidocs/docfx.global.subsite.json | 6 +- websites/apidocs/docfx.grouping.json | 20 +-- websites/apidocs/docfx.highlighter.json | 18 +-- websites/apidocs/docfx.icu.json | 14 +- websites/apidocs/docfx.join.json | 18 +-- websites/apidocs/docfx.json | 69 +++++----- websites/apidocs/docfx.memory.json | 18 +-- websites/apidocs/docfx.misc.json | 18 +-- websites/apidocs/docfx.queries.json | 18 +-- websites/apidocs/docfx.queryparser.json | 20 +-- websites/apidocs/docfx.replicator.json | 18 +-- websites/apidocs/docfx.sandbox.json | 20 +-- websites/apidocs/docfx.site.json | 16 ++- websites/apidocs/docfx.spatial.json | 18 +-- websites/apidocs/docfx.suggest.json | 20 +-- websites/apidocs/docfx.test-framework.json | 12 +- websites/apidocs/docs.ps1 | 95 ++++++-------- websites/apidocs/toc.yml | 2 +- websites/apidocs/toc/toc.yml | 2 +- 57 files changed, 727 insertions(+), 603 deletions(-) create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/.gitignore create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/.name create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/encodings.xml create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/indexLayout.xml create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/material_theme_project_new.xml create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/misc.xml create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/vcs.xml create mode 100644 src/docs/LuceneDocsPlugins/EnvironmentVariableProcessor.cs diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/.gitignore b/src/docs/.idea/.idea.DocumentationTools/.idea/.gitignore new file mode 100644 index 0000000000..828f634208 --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/.gitignore @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/contentModel.xml +/projectSettingsUpdater.xml +/.idea.DocumentationTools.iml +/modules.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/.name b/src/docs/.idea/.idea.DocumentationTools/.idea/.name new file mode 100644 index 0000000000..71a7101d59 --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/.name @@ -0,0 +1 @@ +DocumentationTools \ No newline at end of file diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/encodings.xml b/src/docs/.idea/.idea.DocumentationTools/.idea/encodings.xml new file mode 100644 index 0000000000..df87cf951f --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/indexLayout.xml b/src/docs/.idea/.idea.DocumentationTools/.idea/indexLayout.xml new file mode 100644 index 0000000000..7b08163ceb --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/material_theme_project_new.xml b/src/docs/.idea/.idea.DocumentationTools/.idea/material_theme_project_new.xml new file mode 100644 index 0000000000..d96f72ae34 --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/material_theme_project_new.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/misc.xml b/src/docs/.idea/.idea.DocumentationTools/.idea/misc.xml new file mode 100644 index 0000000000..a5200749c3 --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/misc.xml @@ -0,0 +1,22 @@ + + + + + + + + GeneralJavaScript and TypeScript + + + JavaScript and TypeScript + + + + + User defined + + + + + + \ No newline at end of file diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/vcs.xml b/src/docs/.idea/.idea.DocumentationTools/.idea/vcs.xml new file mode 100644 index 0000000000..b2bdec2d71 --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/docs/LuceneDocsPlugins/EnvironmentVariableProcessor.cs b/src/docs/LuceneDocsPlugins/EnvironmentVariableProcessor.cs new file mode 100644 index 0000000000..d32db2c831 --- /dev/null +++ b/src/docs/LuceneDocsPlugins/EnvironmentVariableProcessor.cs @@ -0,0 +1,45 @@ +using Docfx.Common; +using Docfx.Plugins; +using System.Collections.Immutable; +using System.Composition; +using System.IO; +using System.Linq; + +namespace LuceneDocsPlugins; + +[Export(nameof(EnvironmentVariableProcessor), typeof(IPostProcessor))] +public class EnvironmentVariableProcessor : IPostProcessor +{ + public ImmutableDictionary PrepareMetadata(ImmutableDictionary metadata) + { + return metadata; + } + + public Manifest Process(Manifest manifest, string outputFolder) + { + foreach (var manifestItem in manifest.Files.Where(x => x.Type == "Conceptual")) + { + foreach (var manifestItemOutputFile in manifestItem.Output) + { + var outputPath = Path.Combine(outputFolder, manifestItemOutputFile.Value.RelativePath); + + var content = File.ReadAllText(outputPath); + + Logger.LogInfo($"Replacing environment variables in {outputPath}"); + + var newContent = EnvironmentVariableUtil.ReplaceEnvironmentVariables(content); + + if (content == newContent) + { + continue; + } + + Logger.LogInfo($"Writing new content to {outputPath}"); + + File.WriteAllText(outputPath, newContent); + } + } + + return manifest; + } +} diff --git a/src/docs/LuceneDocsPlugins/EnvironmentVariableUtil.cs b/src/docs/LuceneDocsPlugins/EnvironmentVariableUtil.cs index 9bdd241281..27ecb583c6 100644 --- a/src/docs/LuceneDocsPlugins/EnvironmentVariableUtil.cs +++ b/src/docs/LuceneDocsPlugins/EnvironmentVariableUtil.cs @@ -1,4 +1,5 @@ -using System; +using Docfx.Common; +using System; using System.Text; using System.Text.RegularExpressions; @@ -21,46 +22,42 @@ namespace LuceneDocsPlugins * limitations under the License. */ - public class EnvironmentVariableUtil + public partial class EnvironmentVariableUtil { - public const string EnvVarRegexString = @"[\<\[]EnvVar\:(\w+?)[\>\]]"; - public static readonly Regex EnvVarRegex = new Regex("^" + EnvVarRegexString, RegexOptions.Compiled); - public static readonly Regex EnvVarRegexInline = new Regex(EnvVarRegexString, RegexOptions.Compiled | RegexOptions.Multiline); + [GeneratedRegex(@"EnvVar\:(\w+)", RegexOptions.Compiled)] + private static partial Regex EnvVarRegex(); - - public static string ReplaceEnvironmentVariables(string sourceText, Match match) - => ReplaceEnvironmentVariables(sourceText, match, reuse: null); - - public static string ReplaceEnvironmentVariables(string sourceText, Match match, StringBuilder reuse) + public static string ReplaceEnvironmentVariables(string sourceText) { - if (match.Success) + var matches = EnvVarRegex().Matches(sourceText); + + if (matches.Count > 0) { - if (reuse is null) - reuse = new StringBuilder(); - else - reuse.Clear(); + var sb = new StringBuilder(sourceText.Length); int lastMatchEnd = 0; - do + foreach (Match match in matches) { var envVar = match.Groups[1].Value; // Append the prefix that didn't match the regex (or text since last match) - reuse.Append(sourceText.Substring(lastMatchEnd, match.Index - lastMatchEnd)); + sb.Append(sourceText.AsSpan(lastMatchEnd, match.Index - lastMatchEnd)); // Do the replacement of the regex match - reuse.Append(Environment.GetEnvironmentVariable(envVar)); + string envVarValue = Environment.GetEnvironmentVariable(envVar); + sb.Append(envVarValue); + Logger.LogInfo($"Replaced environment variable '{envVar}' with value '{envVarValue}' on match {match.Value}"); lastMatchEnd = match.Index + match.Length; - - } while ((match = match.NextMatch()).Success); + } // Append the suffix that didn't match the regex - reuse.Append(sourceText.Substring(lastMatchEnd)); + sb.Append(sourceText.AsSpan(lastMatchEnd)); - return reuse.ToString(); + return sb.ToString(); } + return sourceText; } } diff --git a/src/docs/LuceneDocsPlugins/LuceneDfmEngineCustomizer.cs b/src/docs/LuceneDocsPlugins/LuceneDfmEngineCustomizer.cs index 08865b52e2..5c0b8a6175 100644 --- a/src/docs/LuceneDocsPlugins/LuceneDfmEngineCustomizer.cs +++ b/src/docs/LuceneDocsPlugins/LuceneDfmEngineCustomizer.cs @@ -1,69 +1,69 @@ -using System; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Composition; -using Microsoft.DocAsCode.Dfm; -using Microsoft.DocAsCode.MarkdownLite; +//using System; +//using System.Collections.Generic; +//using System.Collections.Immutable; +//using System.Composition; +//using Microsoft.DocAsCode.Dfm; +//using Microsoft.DocAsCode.MarkdownLite; -namespace LuceneDocsPlugins -{ - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +//namespace LuceneDocsPlugins +//{ +// /* +// * Licensed to the Apache Software Foundation (ASF) under one or more +// * contributor license agreements. See the NOTICE file distributed with +// * this work for additional information regarding copyright ownership. +// * The ASF licenses this file to You under the Apache License, Version 2.0 +// * (the "License"); you may not use this file except in compliance with +// * the License. You may obtain a copy of the License at +// * +// * http://www.apache.org/licenses/LICENSE-2.0 +// * +// * Unless required by applicable law or agreed to in writing, software +// * distributed under the License is distributed on an "AS IS" BASIS, +// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// * See the License for the specific language governing permissions and +// * limitations under the License. +// */ - /// - /// Exports our custom markdown parser via MEF to DocFx - /// - [Export(typeof(IDfmEngineCustomizer))] - public class LuceneDfmEngineCustomizer : IDfmEngineCustomizer - { - public void Customize(DfmEngineBuilder builder, IReadOnlyDictionary parameters) - { - // insert inline rule at the top - builder.InlineRules = builder.InlineRules.Insert(0, new EnvironmentVariableInLinkInlineRule()); - builder.InlineRules = builder.InlineRules.Insert(0, new EnvironmentVariableInlineRule()); - // LUCENENET TODO: The inline text replacement still isn't working. Not sure why. - //builder.InlineRules = builder.InlineRules.Insert(0, new EnvironmentVariableDfmTextInlineRule()); +// /// +// /// Exports our custom markdown parser via MEF to DocFx +// /// +// [Export(typeof(IDfmEngineCustomizer))] +// public class LuceneDfmEngineCustomizer : IDfmEngineCustomizer +// { +// public void Customize(DfmEngineBuilder builder, IReadOnlyDictionary parameters) +// { +// // insert inline rule at the top +// builder.InlineRules = builder.InlineRules.Insert(0, new EnvironmentVariableInLinkInlineRule()); +// builder.InlineRules = builder.InlineRules.Insert(0, new EnvironmentVariableInlineRule()); +// // LUCENENET TODO: The inline text replacement still isn't working. Not sure why. +// //builder.InlineRules = builder.InlineRules.Insert(0, new EnvironmentVariableDfmTextInlineRule()); - //// Find the MarkdownLinkInlineRule position, and insert rules to replace text within the link before it - //var markdownLinkInlineRuleIndex = builder.InlineRules.FindIndex(r => r is MarkdownLinkInlineRule); - //builder.InlineRules.Insert(markdownLinkInlineRuleIndex, new EnvironmentVariableInLinkInlineRule()); +// //// Find the MarkdownLinkInlineRule position, and insert rules to replace text within the link before it +// //var markdownLinkInlineRuleIndex = builder.InlineRules.FindIndex(r => r is MarkdownLinkInlineRule); +// //builder.InlineRules.Insert(markdownLinkInlineRuleIndex, new EnvironmentVariableInLinkInlineRule()); - //builder.InlineRules = Replace(builder.InlineRules); +// //builder.InlineRules = Replace(builder.InlineRules); - // insert block rule above header rule. Why? I dunno, that's what the docs say: - // https://dotnet.github.io/docfx/tutorial/intro_markdown_lite.html#select-token-kind - var blockIndex = builder.BlockRules.FindIndex(r => r is MarkdownHeadingBlockRule); - builder.BlockRules = builder.BlockRules.Insert(blockIndex, new LuceneNoteBlockRule()); +// // insert block rule above header rule. Why? I dunno, that's what the docs say: +// // https://dotnet.github.io/docfx/tutorial/intro_markdown_lite.html#select-token-kind +// var blockIndex = builder.BlockRules.FindIndex(r => r is MarkdownHeadingBlockRule); +// builder.BlockRules = builder.BlockRules.Insert(blockIndex, new LuceneNoteBlockRule()); - // LUCENENET TODO: The code replacement still isn't working (or even matching). Not sure why. - //builder.BlockRules = Replace(builder.BlockRules); - } +// // LUCENENET TODO: The code replacement still isn't working (or even matching). Not sure why. +// //builder.BlockRules = Replace(builder.BlockRules); +// } - private static ImmutableList Replace(ImmutableList blockRules) - where TSource : IMarkdownRule - where TReplacement : IMarkdownRule, new() - { - var index = blockRules.FindIndex(item => item is TSource); - if (index < 0) - { - throw new ArgumentException($"{typeof(TSource).Name} should exist!"); - } - blockRules = blockRules.Insert(index, new TReplacement()); - return blockRules.RemoveAt(index + 1); - } - } -} +// private static ImmutableList Replace(ImmutableList blockRules) +// where TSource : IMarkdownRule +// where TReplacement : IMarkdownRule, new() +// { +// var index = blockRules.FindIndex(item => item is TSource); +// if (index < 0) +// { +// throw new ArgumentException($"{typeof(TSource).Name} should exist!"); +// } +// blockRules = blockRules.Insert(index, new TReplacement()); +// return blockRules.RemoveAt(index + 1); +// } +// } +//} diff --git a/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj b/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj index f656c64d87..c272c1fa6c 100644 --- a/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj +++ b/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj @@ -20,13 +20,13 @@ under the License. - net472 + net8.0 LuceneDocsPlugins LuceneDocsPlugins - + - 7.3 + latest @@ -39,32 +39,16 @@ under the License. true - + false - - - - - - - - - - - - - - - - - - - + + + - \ No newline at end of file + diff --git a/src/docs/LuceneDocsPlugins/LuceneNoteBlockRule.cs b/src/docs/LuceneDocsPlugins/LuceneNoteBlockRule.cs index 938ef3f16a..15cb039c2f 100644 --- a/src/docs/LuceneDocsPlugins/LuceneNoteBlockRule.cs +++ b/src/docs/LuceneDocsPlugins/LuceneNoteBlockRule.cs @@ -1,46 +1,46 @@ -using System.Text.RegularExpressions; -using Microsoft.DocAsCode.MarkdownLite; +//using System.Text.RegularExpressions; +//using Microsoft.DocAsCode.MarkdownLite; -namespace LuceneDocsPlugins -{ - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +//namespace LuceneDocsPlugins +//{ +// /* +// * Licensed to the Apache Software Foundation (ASF) under one or more +// * contributor license agreements. See the NOTICE file distributed with +// * this work for additional information regarding copyright ownership. +// * The ASF licenses this file to You under the Apache License, Version 2.0 +// * (the "License"); you may not use this file except in compliance with +// * the License. You may obtain a copy of the License at +// * +// * http://www.apache.org/licenses/LICENSE-2.0 +// * +// * Unless required by applicable law or agreed to in writing, software +// * distributed under the License is distributed on an "AS IS" BASIS, +// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// * See the License for the specific language governing permissions and +// * limitations under the License. +// */ - /// - /// The regex rule to parse out the custom Lucene tokens - /// - public class LuceneNoteBlockRule : IMarkdownRule - { - // TODO: I think there's an issue with this regex and multi-line or something, for example see: DrillDownQuery class - // since this isn't matching it's experimental tag (there's lots of others too) - public virtual Regex LabelRegex { get; } = new Regex("^@lucene\\.(?(experimental|internal))", RegexOptions.Compiled); +// /// +// /// The regex rule to parse out the custom Lucene tokens +// /// +// public class LuceneNoteBlockRule : IMarkdownRule +// { +// // TODO: I think there's an issue with this regex and multi-line or something, for example see: DrillDownQuery class +// // since this isn't matching it's experimental tag (there's lots of others too) +// public virtual Regex LabelRegex { get; } = new Regex("^@lucene\\.(?(experimental|internal))", RegexOptions.Compiled); - public virtual IMarkdownToken TryMatch(IMarkdownParser parser, IMarkdownParsingContext context) - { +// public virtual IMarkdownToken TryMatch(IMarkdownParser parser, IMarkdownParsingContext context) +// { - var match = LabelRegex.Match(context.CurrentMarkdown); - if (match.Length == 0) - { - return null; - } - var sourceInfo = context.Consume(match.Length); - return new LuceneNoteBlockToken(this, parser.Context, match.Groups[1].Value, sourceInfo); - } +// var match = LabelRegex.Match(context.CurrentMarkdown); +// if (match.Length == 0) +// { +// return null; +// } +// var sourceInfo = context.Consume(match.Length); +// return new LuceneNoteBlockToken(this, parser.Context, match.Groups[1].Value, sourceInfo); +// } - public virtual string Name => "LuceneNote"; - } -} \ No newline at end of file +// public virtual string Name => "LuceneNote"; +// } +//} diff --git a/src/docs/LuceneDocsPlugins/LuceneNoteBlockToken.cs b/src/docs/LuceneDocsPlugins/LuceneNoteBlockToken.cs index d8dd4f6d0c..dffcfb6a6d 100644 --- a/src/docs/LuceneDocsPlugins/LuceneNoteBlockToken.cs +++ b/src/docs/LuceneDocsPlugins/LuceneNoteBlockToken.cs @@ -1,44 +1,44 @@ -using Microsoft.DocAsCode.MarkdownLite; +//using Microsoft.DocAsCode.MarkdownLite; -namespace LuceneDocsPlugins -{ - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +//namespace LuceneDocsPlugins +//{ +// /* +// * Licensed to the Apache Software Foundation (ASF) under one or more +// * contributor license agreements. See the NOTICE file distributed with +// * this work for additional information regarding copyright ownership. +// * The ASF licenses this file to You under the Apache License, Version 2.0 +// * (the "License"); you may not use this file except in compliance with +// * the License. You may obtain a copy of the License at +// * +// * http://www.apache.org/licenses/LICENSE-2.0 +// * +// * Unless required by applicable law or agreed to in writing, software +// * distributed under the License is distributed on an "AS IS" BASIS, +// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// * See the License for the specific language governing permissions and +// * limitations under the License. +// */ - /// - /// A custom token class representing our custom Lucene tokens - /// - public class LuceneNoteBlockToken : IMarkdownToken - { - public LuceneNoteBlockToken(IMarkdownRule rule, IMarkdownContext context, string label, SourceInfo sourceInfo) - { - Rule = rule; - Context = context; - Label = label; - SourceInfo = sourceInfo; - } +// /// +// /// A custom token class representing our custom Lucene tokens +// /// +// public class LuceneNoteBlockToken : IMarkdownToken +// { +// public LuceneNoteBlockToken(IMarkdownRule rule, IMarkdownContext context, string label, SourceInfo sourceInfo) +// { +// Rule = rule; +// Context = context; +// Label = label; +// SourceInfo = sourceInfo; +// } - public IMarkdownRule Rule { get; } +// public IMarkdownRule Rule { get; } - public IMarkdownContext Context { get; } +// public IMarkdownContext Context { get; } - public string Label { get; } +// public string Label { get; } - public SourceInfo SourceInfo { get; } - } +// public SourceInfo SourceInfo { get; } +// } -} \ No newline at end of file +//} diff --git a/src/docs/LuceneDocsPlugins/LuceneNoteTokenRendererPart.cs b/src/docs/LuceneDocsPlugins/LuceneNoteTokenRendererPart.cs index 8782ae16a5..95fb04dca2 100644 --- a/src/docs/LuceneDocsPlugins/LuceneNoteTokenRendererPart.cs +++ b/src/docs/LuceneDocsPlugins/LuceneNoteTokenRendererPart.cs @@ -1,52 +1,52 @@ -using Microsoft.DocAsCode.Dfm; -using Microsoft.DocAsCode.MarkdownLite; -using System.Text; +//using Microsoft.DocAsCode.Dfm; +//using Microsoft.DocAsCode.MarkdownLite; +//using System.Text; -namespace LuceneDocsPlugins -{ - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +//namespace LuceneDocsPlugins +//{ +// /* +// * Licensed to the Apache Software Foundation (ASF) under one or more +// * contributor license agreements. See the NOTICE file distributed with +// * this work for additional information regarding copyright ownership. +// * The ASF licenses this file to You under the Apache License, Version 2.0 +// * (the "License"); you may not use this file except in compliance with +// * the License. You may obtain a copy of the License at +// * +// * http://www.apache.org/licenses/LICENSE-2.0 +// * +// * Unless required by applicable law or agreed to in writing, software +// * distributed under the License is distributed on an "AS IS" BASIS, +// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// * See the License for the specific language governing permissions and +// * limitations under the License. +// */ - /// - /// Used to replace custom Lucene tokens with custom HTML markup - /// - public sealed class LuceneNoteTokenRendererPart : DfmCustomizedRendererPartBase - { - private const string ExperimentalMessage = "This API is experimental and might change in incompatible ways in the next release."; - private const string InternalMessage = "This API is for internal purposes only and might change in incompatible ways in the next release."; +// /// +// /// Used to replace custom Lucene tokens with custom HTML markup +// /// +// public sealed class LuceneNoteTokenRendererPart : DfmCustomizedRendererPartBase +// { +// private const string ExperimentalMessage = "This API is experimental and might change in incompatible ways in the next release."; +// private const string InternalMessage = "This API is for internal purposes only and might change in incompatible ways in the next release."; - private readonly StringBuilder builder = new StringBuilder(); +// private readonly StringBuilder builder = new StringBuilder(); - public override string Name => "LuceneTokenRendererPart"; +// public override string Name => "LuceneTokenRendererPart"; - public override bool Match(IMarkdownRenderer renderer, LuceneNoteBlockToken token, MarkdownBlockContext context) - => true; +// public override bool Match(IMarkdownRenderer renderer, LuceneNoteBlockToken token, MarkdownBlockContext context) +// => true; - public override StringBuffer Render(IMarkdownRenderer renderer, LuceneNoteBlockToken token, MarkdownBlockContext context) - { - string message = token.Label.ToUpperInvariant() == "INTERNAL" ? InternalMessage : ExperimentalMessage; +// public override StringBuffer Render(IMarkdownRenderer renderer, LuceneNoteBlockToken token, MarkdownBlockContext context) +// { +// string message = token.Label.ToUpperInvariant() == "INTERNAL" ? InternalMessage : ExperimentalMessage; - builder.Clear(); // Reuse string builder - builder.AppendLine("
"); - builder.AppendLine("
Note
"); - builder.Append("

").Append(message).AppendLine("

"); - builder.AppendLine("
"); - return builder.ToString(); - //return "
" + string.Format(Message, token.Label.ToUpper()) + "
"; - } - } -} \ No newline at end of file +// builder.Clear(); // Reuse string builder +// builder.AppendLine("
"); +// builder.AppendLine("
Note
"); +// builder.Append("

").Append(message).AppendLine("

"); +// builder.AppendLine("
"); +// return builder.ToString(); +// //return "
" + string.Format(Message, token.Label.ToUpper()) + "
"; +// } +// } +//} diff --git a/src/docs/LuceneDocsPlugins/RendererPartProvider.cs b/src/docs/LuceneDocsPlugins/RendererPartProvider.cs index 58ddda35ac..aa778c54f7 100644 --- a/src/docs/LuceneDocsPlugins/RendererPartProvider.cs +++ b/src/docs/LuceneDocsPlugins/RendererPartProvider.cs @@ -1,40 +1,40 @@ -using System.Collections.Generic; -using System.Composition; -using Microsoft.DocAsCode.Dfm; +//using System.Collections.Generic; +//using System.Composition; +//using Microsoft.DocAsCode.Dfm; -namespace LuceneDocsPlugins -{ - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +//namespace LuceneDocsPlugins +//{ +// /* +// * Licensed to the Apache Software Foundation (ASF) under one or more +// * contributor license agreements. See the NOTICE file distributed with +// * this work for additional information regarding copyright ownership. +// * The ASF licenses this file to You under the Apache License, Version 2.0 +// * (the "License"); you may not use this file except in compliance with +// * the License. You may obtain a copy of the License at +// * +// * http://www.apache.org/licenses/LICENSE-2.0 +// * +// * Unless required by applicable law or agreed to in writing, software +// * distributed under the License is distributed on an "AS IS" BASIS, +// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// * See the License for the specific language governing permissions and +// * limitations under the License. +// */ - /// - /// Exports our custom renderer via MEF to DocFx - /// - [Export(typeof(IDfmCustomizedRendererPartProvider))] - public class RendererPartProvider : IDfmCustomizedRendererPartProvider - { - private readonly LuceneNoteTokenRendererPart luceneNoteTokenRendererPart = new LuceneNoteTokenRendererPart(); +// /// +// /// Exports our custom renderer via MEF to DocFx +// /// +// [Export(typeof(IDfmCustomizedRendererPartProvider))] +// public class RendererPartProvider : IDfmCustomizedRendererPartProvider +// { +// private readonly LuceneNoteTokenRendererPart luceneNoteTokenRendererPart = new LuceneNoteTokenRendererPart(); - public IEnumerable CreateParts(IReadOnlyDictionary parameters) - { - yield return luceneNoteTokenRendererPart; - //yield return new EnvironmentVariableRendererPart(); - //yield return new EnvironmentVariableBlockRendererPart(); - } - } +// public IEnumerable CreateParts(IReadOnlyDictionary parameters) +// { +// yield return luceneNoteTokenRendererPart; +// //yield return new EnvironmentVariableRendererPart(); +// //yield return new EnvironmentVariableBlockRendererPart(); +// } +// } -} \ 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 8cf65c05f3..422f81d288 100644 --- a/src/dotnet/tools/lucene-cli/docs/index.md +++ b/src/dotnet/tools/lucene-cli/docs/index.md @@ -1,4 +1,4 @@ -# Lucene.NET command line interface (CLI) tools +# Lucene.NET command line interface (CLI) tools The Lucene.NET command line interface (CLI) is a new cross-platform toolchain with utilities for maintaining Lucene.NET and demos for learning basic Lucene.NET functionality. diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_head.liquid b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_head.liquid index 2af71a645e..96dc4c32e5 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_head.liquid +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_head.liquid @@ -17,13 +17,13 @@ {%- endif -%} {%- if _appFaviconPath -%} - + {%- else -%} - + {%- endif -%} - - - + + + {%- if _noindex -%} diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_logo.liquid b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_logo.liquid index 7bc65a65b8..85922ab504 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_logo.liquid +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_logo.liquid @@ -1,8 +1,8 @@ {% comment -%}Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.{% endcomment -%} - + {%- if _appLogoPath -%} - + {%- else -%} - + {%- endif -%} diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_scripts.liquid b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_scripts.liquid index 6640a85cdf..fa95fcd7b9 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_scripts.liquid +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_scripts.liquid @@ -1,4 +1,4 @@ {% comment -%}Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.{% endcomment -%} - - - + + + diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/head.tmpl.partial b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/head.tmpl.partial index 4e8cd7918b..064de9db10 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/head.tmpl.partial +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/head.tmpl.partial @@ -8,10 +8,10 @@ {{#_description}}{{/_description}} - - - - + + + + {{#_noindex}}{{/_noindex}} diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/logo.tmpl.partial b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/logo.tmpl.partial index 8209615a35..5cb694628a 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/logo.tmpl.partial +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/logo.tmpl.partial @@ -1,5 +1,5 @@ {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} - - + + diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/scripts.tmpl.partial b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/scripts.tmpl.partial index ab3204ecb9..73dada5141 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/scripts.tmpl.partial +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/scripts.tmpl.partial @@ -1,5 +1,5 @@ {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} - - - + + + diff --git a/websites/apidocs/Templates/LuceneTemplate/partials/logo.tmpl.partial b/websites/apidocs/Templates/LuceneTemplate/partials/logo.tmpl.partial index f2b652b42d..ee0b7d6415 100644 --- a/websites/apidocs/Templates/LuceneTemplate/partials/logo.tmpl.partial +++ b/websites/apidocs/Templates/LuceneTemplate/partials/logo.tmpl.partial @@ -1,5 +1,5 @@ {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} - + diff --git a/websites/apidocs/docfx.analysis-common.json b/websites/apidocs/docfx.analysis-common.json index 674f5a3b48..166949ba60 100644 --- a/websites/apidocs/docfx.analysis-common.json +++ b/websites/apidocs/docfx.analysis-common.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/analysis-common", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], @@ -33,15 +33,15 @@ "**.md" ], "src": "obj/docfx/api/analysis-common" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "analysis-common/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.analysis-kuromoji.json b/websites/apidocs/docfx.analysis-kuromoji.json index 027496033a..dafdaeb449 100644 --- a/websites/apidocs/docfx.analysis-kuromoji.json +++ b/websites/apidocs/docfx.analysis-kuromoji.json @@ -15,27 +15,27 @@ ], "dest": "obj/docfx/api/analysis-kuromoji", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/analysis-kuromoji" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "analysis-kuromoji/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.analysis-morfologik.json b/websites/apidocs/docfx.analysis-morfologik.json index 8a34b5f633..c75895949e 100644 --- a/websites/apidocs/docfx.analysis-morfologik.json +++ b/websites/apidocs/docfx.analysis-morfologik.json @@ -15,28 +15,28 @@ ], "dest": "obj/docfx/api/analysis-morfologik", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/analysis-morfologik" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "analysis-morfologik/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.analysis-opennlp.json b/websites/apidocs/docfx.analysis-opennlp.json index b266a1cbd1..6051ec5fe4 100644 --- a/websites/apidocs/docfx.analysis-opennlp.json +++ b/websites/apidocs/docfx.analysis-opennlp.json @@ -15,27 +15,27 @@ ], "dest": "obj/docfx/api/analysis-opennlp", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/analysis-opennlp" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "analysis-opennlp/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.analysis-phonetic.json b/websites/apidocs/docfx.analysis-phonetic.json index 7957aa9bfc..75a380ed36 100644 --- a/websites/apidocs/docfx.analysis-phonetic.json +++ b/websites/apidocs/docfx.analysis-phonetic.json @@ -15,27 +15,27 @@ ], "dest": "obj/docfx/api/analysis-phonetic", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/analysis-phonetic" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "analysis-phonetic/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -46,7 +46,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/analysis-phonetic/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.analysis-smartcn.json b/websites/apidocs/docfx.analysis-smartcn.json index c1a900a3c2..d5ac444488 100644 --- a/websites/apidocs/docfx.analysis-smartcn.json +++ b/websites/apidocs/docfx.analysis-smartcn.json @@ -15,27 +15,27 @@ ], "dest": "obj/docfx/api/analysis-smartcn", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/analysis-smartcn" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "analysis-smartcn/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -46,7 +46,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/analysis-smartcn/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.analysis-stempel.json b/websites/apidocs/docfx.analysis-stempel.json index 62e723df6a..41a0708333 100644 --- a/websites/apidocs/docfx.analysis-stempel.json +++ b/websites/apidocs/docfx.analysis-stempel.json @@ -15,27 +15,27 @@ ], "dest": "obj/docfx/api/analysis-stempel", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/analysis-stempel" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "analysis-stempel/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -46,7 +46,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/analysis-stempel/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.benchmark.json b/websites/apidocs/docfx.benchmark.json index c201e9d82f..0ea98bd224 100644 --- a/websites/apidocs/docfx.benchmark.json +++ b/websites/apidocs/docfx.benchmark.json @@ -15,27 +15,27 @@ ], "dest": "obj/docfx/api/benchmark", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/benchmark" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "benchmark/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -46,7 +46,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/benchmark/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.classification.json b/websites/apidocs/docfx.classification.json index 0494da0927..6aa4cc6959 100644 --- a/websites/apidocs/docfx.classification.json +++ b/websites/apidocs/docfx.classification.json @@ -15,27 +15,27 @@ ], "dest": "obj/docfx/api/classification", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/classification" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "classification/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -46,7 +46,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/classification/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.codecs.json b/websites/apidocs/docfx.codecs.json index 3c530bb97c..502458ab23 100644 --- a/websites/apidocs/docfx.codecs.json +++ b/websites/apidocs/docfx.codecs.json @@ -15,33 +15,33 @@ ], "dest": "obj/docfx/api/codecs", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "overview.md" ], "src": "../../src/Lucene.Net.Codecs" - }, + }, { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/codecs" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "codecs/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -52,7 +52,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/codecs/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.core.json b/websites/apidocs/docfx.core.json index 17f090ee81..67d87654c5 100644 --- a/websites/apidocs/docfx.core.json +++ b/websites/apidocs/docfx.core.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/core", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], @@ -37,7 +37,7 @@ }, { "files": [ - "toc.yml", + "./toc.yml", "core/toc.yml" ], "src": "toc" @@ -48,8 +48,8 @@ ], "src": "../../src/dotnet/docs" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -59,7 +59,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/core/**/*.md" @@ -67,7 +67,8 @@ } ], "xref": [ - "_site/api/codecs/xrefmap.yml" + "_site/api/codecs/xrefmap.yml", + "https://learn.microsoft.com/en-us/dotnet/.xrefmap.json" ], "dest": "_site/api/core", "globalMetadataFiles": [ @@ -79,7 +80,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.demo.json b/websites/apidocs/docfx.demo.json index 9387b01993..cc3c1c80a2 100644 --- a/websites/apidocs/docfx.demo.json +++ b/websites/apidocs/docfx.demo.json @@ -15,28 +15,28 @@ ], "dest": "obj/docfx/api/demo", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/demo" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "demo/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -46,7 +46,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/demo/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.expressions.json b/websites/apidocs/docfx.expressions.json index a505676a4a..af8cf5c017 100644 --- a/websites/apidocs/docfx.expressions.json +++ b/websites/apidocs/docfx.expressions.json @@ -15,34 +15,34 @@ ], "dest": "obj/docfx/api/expressions", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "overview.md" ], "src": "../../src/Lucene.Net.Expressions" - }, + }, { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/expressions" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "expressions/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -52,7 +52,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/expressions/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.facet.json b/websites/apidocs/docfx.facet.json index 401c9521cf..88273e39e0 100644 --- a/websites/apidocs/docfx.facet.json +++ b/websites/apidocs/docfx.facet.json @@ -15,34 +15,34 @@ ], "dest": "obj/docfx/api/facet", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "package.md" ], "src": "../../src/Lucene.Net.Facet" - }, + }, { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/facet" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "facet/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -52,7 +52,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/facet/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.global.json b/websites/apidocs/docfx.global.json index b46149ea1b..59e6a7b44f 100644 --- a/websites/apidocs/docfx.global.json +++ b/websites/apidocs/docfx.global.json @@ -4,12 +4,6 @@ "_appFaviconPath": "logo/favicon.ico", "_enableSearch": true, "_appLogoPath": "logo/lucene-net-color.png", - "_appFooter": "Copyright \u0026copy; 2022 The Apache Software Foundation, Licensed under the \u003ca href=\u0027http://www.apache.org/licenses/LICENSE-2.0\u0027 target=\u0027_blank\u0027\u003eApache License, Version 2.0\u003c/a\u003e\u003cbr/\u003e \u003csmall\u003eApache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation. \u003cbr/\u003eAll other marks mentioned may be trademarks or registered trademarks of their respective owners.\u003c/small\u003e", - "_gitContribute": { - "repo": "https://github.com/apache/lucenenet", - "branch": "docs/4.8.0-beta00016", - "apiSpecFolder": "websites/apidocs/apiSpec", - "tag": "Lucene.Net_4_8_0_beta00016" - }, + "_appFooter": "Copyright \u0026copy; 2024 The Apache Software Foundation, Licensed under the \u003ca href=\u0027http://www.apache.org/licenses/LICENSE-2.0\u0027 target=\u0027_blank\u0027\u003eApache License, Version 2.0\u003c/a\u003e\u003cbr/\u003e \u003csmall\u003eApache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation. \u003cbr/\u003eAll other marks mentioned may be trademarks or registered trademarks of their respective owners.\u003c/small\u003e", "_gitSource": "https://github.com/apache/lucenenet.git" } diff --git a/websites/apidocs/docfx.global.subsite.json b/websites/apidocs/docfx.global.subsite.json index 6cf6b985f1..30838e720d 100644 --- a/websites/apidocs/docfx.global.subsite.json +++ b/websites/apidocs/docfx.global.subsite.json @@ -1,4 +1,4 @@ -{ - "_rel": "https://lucenenet.apache.org/docs/4.8.0-beta00009/", +{ + "_rel": "https://lucenenet.apache.org/docs/4.8.0-beta00009", "_api": "https://lucenenet.apache.org/docs/4.8.0-beta00016/" -} +} \ No newline at end of file diff --git a/websites/apidocs/docfx.grouping.json b/websites/apidocs/docfx.grouping.json index 9c7fa00341..fa2bd3a5ce 100644 --- a/websites/apidocs/docfx.grouping.json +++ b/websites/apidocs/docfx.grouping.json @@ -15,34 +15,34 @@ ], "dest": "obj/docfx/api/grouping", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "package.md" ], "src": "../../src/Lucene.Net.Grouping" - }, + }, { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/grouping" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "grouping/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -52,7 +52,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/grouping/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.highlighter.json b/websites/apidocs/docfx.highlighter.json index a1911531ff..496333dc54 100644 --- a/websites/apidocs/docfx.highlighter.json +++ b/websites/apidocs/docfx.highlighter.json @@ -15,12 +15,12 @@ ], "dest": "obj/docfx/api/highlighter", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "overview.md" @@ -33,16 +33,16 @@ "**.md" ], "src": "obj/docfx/api/highlighter" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "highlighter/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -52,7 +52,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/highlighter/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.icu.json b/websites/apidocs/docfx.icu.json index 2049a534c3..3948383d60 100644 --- a/websites/apidocs/docfx.icu.json +++ b/websites/apidocs/docfx.icu.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/icu", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], @@ -33,15 +33,15 @@ "**.md" ], "src": "obj/docfx/api/icu" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "icu/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -52,7 +52,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/icu/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.join.json b/websites/apidocs/docfx.join.json index 8ce0f4a746..10b40889b3 100644 --- a/websites/apidocs/docfx.join.json +++ b/websites/apidocs/docfx.join.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/join", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], @@ -26,23 +26,23 @@ "package.md" ], "src": "../../src/Lucene.Net.Join" - }, + }, { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/join" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "join/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -52,7 +52,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/join/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.json b/websites/apidocs/docfx.json index 3a2bad07fc..307a4f40cf 100644 --- a/websites/apidocs/docfx.json +++ b/websites/apidocs/docfx.json @@ -16,7 +16,7 @@ ], "dest": "obj/docfx/api/Lucene.Net", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -35,7 +35,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.Common", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -54,7 +54,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.Kuromoji", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -73,7 +73,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.Morfologik", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -92,7 +92,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.OpenNLP", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -111,7 +111,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.Phonetic", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -130,7 +130,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.SmartCn", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -149,7 +149,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.Stempel", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -168,7 +168,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Benchmarks", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -187,7 +187,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Classification", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -206,7 +206,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Codecs", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -225,7 +225,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Expressions", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -244,7 +244,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Facet", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -263,7 +263,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Grouping", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -282,7 +282,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Highlighter", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -301,7 +301,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.ICU", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -320,7 +320,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Join", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -339,7 +339,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Memory", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -358,7 +358,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Misc", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -377,7 +377,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Queries", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -396,7 +396,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.QueryParser", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -415,7 +415,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Replicator", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -434,7 +434,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Sandbox", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -453,7 +453,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Spatial", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -472,7 +472,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Suggest", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -490,7 +490,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.TestFramework", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -509,7 +509,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Demo", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], @@ -559,7 +559,7 @@ }, { "files": [ - "toc.yml", + "./toc.yml", "*.md", "web.config" ] @@ -582,12 +582,7 @@ "_appFaviconPath": "logo/favicon.ico", "_enableSearch": true, "_appLogoPath": "logo/lucene-net-color.png", - "_appFooter": "Copyright © 2020 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.
", - "_gitContribute": { - "repo": "https://github.com/apache/lucenenet", - "branch": "docs/4.8.0-beta00008", - "apiSpecFolder": "websites/apidocs/apiSpec" - } + "_appFooter": "Copyright © 2020 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.
" }, "overwrite": [ { @@ -624,13 +619,13 @@ "fileMetadataFiles": [], "template": [ "default", - "LuceneTemplate" + "LuceneTemplate" ], - "postProcessors": [], + "postProcessors": ["EnvironmentVariableProcessor"], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, "cleanupCacheHistory": false, "disableGitFeatures": false } -} +} \ No newline at end of file diff --git a/websites/apidocs/docfx.memory.json b/websites/apidocs/docfx.memory.json index 07908a8dd5..afe756cb3d 100644 --- a/websites/apidocs/docfx.memory.json +++ b/websites/apidocs/docfx.memory.json @@ -15,28 +15,28 @@ ], "dest": "obj/docfx/api/memory", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/memory" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "memory/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -46,7 +46,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/memory/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.misc.json b/websites/apidocs/docfx.misc.json index 09165167e1..8e09b32933 100644 --- a/websites/apidocs/docfx.misc.json +++ b/websites/apidocs/docfx.misc.json @@ -15,28 +15,28 @@ ], "dest": "obj/docfx/api/misc", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/misc" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "misc/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -46,7 +46,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/misc/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.queries.json b/websites/apidocs/docfx.queries.json index 4566e4f787..9fb38e106c 100644 --- a/websites/apidocs/docfx.queries.json +++ b/websites/apidocs/docfx.queries.json @@ -15,28 +15,28 @@ ], "dest": "obj/docfx/api/queries", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/queries" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "queries/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -46,7 +46,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/queries/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.queryparser.json b/websites/apidocs/docfx.queryparser.json index 76096622a0..90a7d92086 100644 --- a/websites/apidocs/docfx.queryparser.json +++ b/websites/apidocs/docfx.queryparser.json @@ -15,34 +15,34 @@ ], "dest": "obj/docfx/api/queryparser", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "overview.md" ], "src": "../../src/Lucene.Net.QueryParser" - }, + }, { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/queryparser" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "queryparser/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -52,7 +52,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/queryparser/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.replicator.json b/websites/apidocs/docfx.replicator.json index 1be897ae24..b1d3015dcb 100644 --- a/websites/apidocs/docfx.replicator.json +++ b/websites/apidocs/docfx.replicator.json @@ -15,28 +15,28 @@ ], "dest": "obj/docfx/api/replicator", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/replicator" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "replicator/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -46,7 +46,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/replicator/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.sandbox.json b/websites/apidocs/docfx.sandbox.json index c6ce693dd5..a88c090799 100644 --- a/websites/apidocs/docfx.sandbox.json +++ b/websites/apidocs/docfx.sandbox.json @@ -15,34 +15,34 @@ ], "dest": "obj/docfx/api/sandbox", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "overview.md" ], "src": "../../src/Lucene.Net.Sandbox" - }, + }, { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/sandbox" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "sandbox/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -52,7 +52,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/sandbox/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.site.json b/websites/apidocs/docfx.site.json index 384446c6fb..c14b0177ef 100644 --- a/websites/apidocs/docfx.site.json +++ b/websites/apidocs/docfx.site.json @@ -1,9 +1,9 @@ -{ +{ "build": { "content": [ { "files": [ - "toc.yml", + "./toc.yml", "*.md" ] }, @@ -44,7 +44,7 @@ "_site/api/grouping/xrefmap.yml", "_site/api/highlighter/xrefmap.yml", "_site/api/icu/xrefmap.yml", - "_site/api/join/xrefmap.yml", + "_site/api/join/xrefmap.yml", "_site/api/memory/xrefmap.yml", "_site/api/misc/xrefmap.yml", "_site/api/queries/xrefmap.yml", @@ -52,18 +52,22 @@ "_site/api/replicator/xrefmap.yml", "_site/api/sandbox/xrefmap.yml", "_site/api/spatial/xrefmap.yml", - "_site/api/suggest/xrefmap.yml", + "_site/api/suggest/xrefmap.yml", "_site/api/test-framework/xrefmap.yml", "_site/api/demo/xrefmap.yml" ], "dest": "_site", - "globalMetadataFiles": ["docfx.global.json"], + "globalMetadataFiles": [ + "docfx.global.json" + ], "template": [ "default", "Templates/LuceneTemplate", "Templates/LuceneTemplateAssets" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.spatial.json b/websites/apidocs/docfx.spatial.json index 995bd9657c..34f49ddbaf 100644 --- a/websites/apidocs/docfx.spatial.json +++ b/websites/apidocs/docfx.spatial.json @@ -15,28 +15,28 @@ ], "dest": "obj/docfx/api/spatial", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/spatial" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "spatial/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -46,7 +46,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/spatial/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.suggest.json b/websites/apidocs/docfx.suggest.json index 036cf7646c..f5c712400a 100644 --- a/websites/apidocs/docfx.suggest.json +++ b/websites/apidocs/docfx.suggest.json @@ -15,34 +15,34 @@ ], "dest": "obj/docfx/api/suggest", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "overview.md" ], "src": "../../src/Lucene.Net.Suggest" - }, + }, { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/suggest" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "suggest/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -52,7 +52,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/suggest/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.test-framework.json b/websites/apidocs/docfx.test-framework.json index 2ad8e81072..278086d742 100644 --- a/websites/apidocs/docfx.test-framework.json +++ b/websites/apidocs/docfx.test-framework.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/test-framework", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], @@ -36,13 +36,13 @@ }, { "files": [ - "toc.yml", + "./toc.yml", "test-framework/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "apiSpec/test-framework/**/*.md" @@ -59,7 +59,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docs.ps1 b/websites/apidocs/docs.ps1 index 38728b50ab..02f667a89f 100644 --- a/websites/apidocs/docs.ps1 +++ b/websites/apidocs/docs.ps1 @@ -23,6 +23,7 @@ param ( [string] $LuceneNetVersion, [switch] $ServeDocs = $false, [switch] $Clean = $false, + [switch] $SkipToolInstall = $false, # to speed up iteration if you already have the tool installed [switch] $DisableMetaData = $false, [switch] $DisableBuild = $false, [switch] $DisablePlugins = $false, @@ -34,7 +35,8 @@ param ( [Parameter(Mandatory = $false)] [int] $StagingPort = 8080 ) -$MinimumSdkVersion = "3.1.100" # Minimum Required .NET SDK (must not be a pre-release) +$MinimumSdkVersion = "8.0.204" # Minimum Required .NET SDK (must not be a pre-release) +$DocFxVersion = "2.77.0" # Required DocFx version $ErrorActionPreference = "Stop" @@ -57,36 +59,35 @@ $env:LuceneNetReleaseTag = $VCSLabel $PSScriptFilePath = (Get-Item $MyInvocation.MyCommand.Path).FullName $RepoRoot = (get-item $PSScriptFilePath).Directory.Parent.Parent.FullName; $ApiDocsFolder = Join-Path -Path $RepoRoot -ChildPath "websites\apidocs"; -$ToolsFolder = Join-Path -Path $ApiDocsFolder -ChildPath "tools"; $CliIndexPath = Join-Path -Path $RepoRoot -ChildPath "src\dotnet\tools\lucene-cli\docs\index.md"; $TocPath1 = Join-Path -Path $ApiDocsFolder -ChildPath "toc.yml" $TocPath2 = Join-Path -Path $ApiDocsFolder -ChildPath "toc\toc.yml" $BreadcrumbPath = Join-Path -Path $ApiDocsFolder -ChildPath "docfx.global.subsite.json" -#ensure the /build/tools folder -New-Item $ToolsFolder -type directory -force +# install docfx tool +if ($SkipToolInstall -eq $false) { + $InstallDocFx = $false + try { + $InstalledDocFxVersion = (& docfx --version).Trim().Split('+')[0] -if ($Clean) { - Write-Host "Cleaning tools..." - Remove-Item (Join-Path -Path $ToolsFolder "\*") -recurse -force -ErrorAction SilentlyContinue -} - -New-Item "$ToolsFolder\tmp" -type directory -force - -# Go get docfx.exe if we don't have it -New-Item "$ToolsFolder\docfx" -type directory -force -$DocFxExe = "$ToolsFolder\docfx\docfx.exe" -if (-not (test-path $DocFxExe)) { - Write-Host "Retrieving docfx..." - $DocFxZip = "$ToolsFolder\tmp\docfx.zip" - Invoke-WebRequest "https://github.com/dotnet/docfx/releases/download/v2.58/docfx.zip" -OutFile $DocFxZip -TimeoutSec 60 + if ([version]$InstalledDocFxVersion -lt [version]$DocFxVersion) { + Write-Host "DocFx is installed, but the version is less than $DocFxVersion, will install it." + $InstallDocFx = $true + } + else { + Write-Host "DocFx is installed and the version is $InstalledDocFxVersion." + } + } catch { + Write-Host "DocFx is not installed or not in the PATH, will install it." + $InstallDocFx = $true + } - #unzip - Expand-Archive $DocFxZip -DestinationPath (Join-Path -Path $ToolsFolder -ChildPath "docfx") + if ($InstallDocFx -eq $true) { + Write-Host "Installing docfx global tool..." + dotnet tool install -g docfx --version $DocFxVersion + } } -Remove-Item -Recurse -Force "$ToolsFolder\tmp" - # delete anything that already exists if ($Clean) { Write-Host "Cleaning..." @@ -124,14 +125,20 @@ $DocFxGlobalJson = Join-Path -Path $ApiDocsFolder "docfx.global.json" $DocFxJsonContent = Get-Content $DocFxGlobalJson | ConvertFrom-Json $DocFxJsonContent._appFooter = "Copyright © $((Get-Date).Year) The Apache Software Foundation, Licensed under the Apache License, Version 2.0
Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.
" $DocFxJsonContent._appTitle = "Apache Lucene.NET $LuceneNetVersion Documentation" -$DocFxJsonContent._gitContribute.branch = "docs/$LuceneNetVersion" -$DocFxJsonContent._gitContribute.tag = "$VCSLabel" +#$DocFxJsonContent._gitContribute.branch = "docs/$LuceneNetVersion" +#$DocFxJsonContent._gitContribute.tag = "$VCSLabel" $DocFxJsonContent | ConvertTo-Json -depth 100 | Set-Content $DocFxGlobalJson +# update the docfx.json file +#$DocFxJson = Join-Path -Path $ApiDocsFolder "docfx.json" +#$DocFxJsonContent = Get-Content $DocFxJson | ConvertFrom-Json +#$DocFxJsonContent.build.globalMetadata._gitContribute.branch = "docs/$LuceneNetVersion" +#$DocFxJsonContent.build.globalMetadata._gitContribute.tag = "$VCSLabel" + # NOTE: The order of these depends on if one of the projects requries the xref map of another, normally all require the core xref map $DocFxJsonMeta = @( - "docfx.codecs.json", "docfx.core.json", + "docfx.codecs.json", "docfx.analysis-common.json", "docfx.analysis-kuromoji.json", "docfx.analysis-morfologik.json", @@ -168,13 +175,7 @@ if ($? -and $DisableMetaData -eq $false) { # build the output Write-Host "Building api metadata for $projFile..." - - if ($Clean) { - & $DocFxExe metadata $projFile --log "$DocFxLog" --loglevel $LogLevel --force - } - else { - & $DocFxExe metadata $projFile --log "$DocFxLog" --loglevel $LogLevel - } + & docfx metadata $projFile --log "$DocFxLog" --logLevel $LogLevel --disableGitFeatures } } @@ -196,23 +197,11 @@ if ($? -and $DisableBuild -eq $false) { $DocFxLog = Join-Path -Path $ApiDocsFolder "obj\${proj}.build.log" + Start-Sleep -Seconds 1 + # build the output Write-Host "Building site output for $projFile..." - - # Specifying --force, --forcePostProcess and --cleanupCacheHistory - # seems to be required in order for all xref links to resolve consistently across - # all of the docfx builds (see https://dotnet.github.io/docfx/RELEASENOTE.html?tabs=csharp). - # Previously we used to do this: - # Remove-Item (Join-Path -Path $ApiDocsFolder "obj\.cache") -recurse -force -ErrorAction SilentlyContinue - # to force remove the cache else the xref's wouldn't work correctly. So far with these new parameters - # it seems much happier. - - if ($Clean) { - & $DocFxExe build $projFile --log "$DocFxLog" --loglevel $LogLevel --force --debug --cleanupCacheHistory --force --forcePostProcess - } - else { - & $DocFxExe build $projFile --log "$DocFxLog" --loglevel $LogLevel --debug --cleanupCacheHistory --force --forcePostProcess - } + & docfx build $projFile --log "$DocFxLog" --logLevel $LogLevel --debug --disableGitFeatures # Add the baseUrl to the output xrefmap, see https://github.com/dotnet/docfx/issues/2346#issuecomment-356054027 $projFileJson = Get-Content $projFile | ConvertFrom-Json @@ -239,18 +228,12 @@ if ($?) { # build the output Write-Host "Building docs..." - - if ($Clean) { - & $DocFxExe $DocFxJsonSite --log "$DocFxLog" --loglevel $LogLevel --force --debug - } - else { - & $DocFxExe $DocFxJsonSite --log "$DocFxLog" --loglevel $LogLevel --debug - } + & docfx $DocFxJsonSite --log "$DocFxLog" --logLevel $LogLevel --debug } else { # build + serve (for testing) Write-Host "starting website..." - & $DocFxExe $DocFxJsonSite --log "$DocFxLog" --loglevel $LogLevel --serve --port $StagingPort --debug + & docfx $DocFxJsonSite --log "$DocFxLog" --logLevel $LogLevel --serve --port $StagingPort --debug } } @@ -258,4 +241,4 @@ if ($?) { # and then many of these params can be excluded from the json file # .\docfx.exe ..\..\docfx.core.json --globalMetadataFiles docfx.global.json --output _TEST --serve --force --loglevel Warning -# docfx.exe --output TARGET --globalMetadataFiles docfx.global.json Warning \ No newline at end of file +# docfx.exe --output TARGET --globalMetadataFiles docfx.global.json Warning diff --git a/websites/apidocs/toc.yml b/websites/apidocs/toc.yml index 446bef5a3d..58f33f6be5 100644 --- a/websites/apidocs/toc.yml +++ b/websites/apidocs/toc.yml @@ -1,4 +1,4 @@ -- name: Lucene.Net API +- name: Lucene.Net API topicHref: https://lucenenet.apache.org/docs/4.8.0-beta00016/ - name: Lucene.Net CLI href: ../../src/dotnet/tools/lucene-cli/docs/ diff --git a/websites/apidocs/toc/toc.yml b/websites/apidocs/toc/toc.yml index f4c7b8d969..abc5e44a61 100644 --- a/websites/apidocs/toc/toc.yml +++ b/websites/apidocs/toc/toc.yml @@ -1,4 +1,4 @@ -- name: Lucene.Net API +- name: Lucene.Net API topicHref: https://lucenenet.apache.org/docs/4.8.0-beta00016 - name: Lucene.Net CLI topicHref: https://lucenenet.apache.org/docs/4.8.0-beta00016/cli/index.html