Open Rick-Anderson opened 2 months ago
Confirming AFAIK, the ones in the blazor
folder are good, except for new articles that were added this year, which will get the INCLUDE when .NET 9 docs release (I've added a tracking item reminder for myself to those articles).
The three outside of the blazor
node ...
... don't have it, and I suppose it's best to let you deal with those in due course of adding the INCLUDE in those folders.
Note: This has been added to most of the docs, I am to find the remaining ones that didn't get one.
It looks like the include files assume a minimum monikerRange provided in the metadata. Otherwise you get errors. I ran into old topics that do not have a minimum range, I will set those aside for last to review and assign minimum ranges, then apply the includes. That sub-portion will have to be tracked in a new issue. I didn't reserve time to account for that condition, (nor for the other criteria figured out as we went along.)
There are a fair number of topics that are not compatible with the include as is. Re-sorting through those, and trying again. Will do first the ones that can be without error. The rest are going to require fixes to their moniker ranges, which takes some time to determine what ranges the topics was intended to be targeted for. Most of these problematic ones are topics that that have been around from 1.x through 2.x or have had no minimum range ever declared.
Add
[!INCLUDE[](~/includes/not-latest-version.md)]
to all non-blazor topicsSkip What's new and a few others that are not version specific.
Use a regex to do the work. cc @tdykstra @guardrex
Update of instructions by WadePickett: After some discussion, it sounds like there are 3 conditions involved:
If the doc meta data at the top of the page has a monikerRange of: monikerRange: '>= aspnetcore-8.0'
Then insert this just below the H1 (#):
If the doc meta data at the top of the page has a monikerRange of: :::moniker range=">= aspnetcore-9.0"
Then insert this just below the H1 (#)
If the doc meta data at the top of the page has a monikerRange that is anything <8.0 or no monikerRange at the top of the page at all: Then insert this just below the H1 (#):
Other Critera: Only files that meet all of the following conditions receive the inserted text:
[!INCLUDE[](~/includes/not-latest-version.md)]
or[!INCLUDE[](~/includes/not-ga-yet.md)]
in it.Associated WorkItem - 286789