Skip to content

Commit 870edd0

Browse files
Showcase both docs section landing-page conventions (index.md + folder-named)
Add two example command groups exercising both overview-page conventions: IndexSection uses index.md as its section landing page, NamedSection uses a folder-named NamedSection.md. Adds Get-IndexSectionTest and Get-NamedSectionTest plus their Pester tests. Template already runs Process-PSModule v6.1.1 (#26).
1 parent 6a2826f commit 870edd0

5 files changed

Lines changed: 58 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
function Get-IndexSectionTest {
2+
<#
3+
.SYNOPSIS
4+
Performs tests on a module.
5+
6+
.DESCRIPTION
7+
Performs tests on a module.
8+
9+
.EXAMPLE
10+
Get-IndexSectionTest -Name 'World'
11+
12+
"Hello, World!"
13+
#>
14+
[CmdletBinding()]
15+
param (
16+
# Name of the person to greet.
17+
[Parameter(Mandatory)]
18+
[string] $Name
19+
)
20+
Write-Output "Hello, $Name!"
21+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Index Section
2+
3+
This section's landing page is provided by an `index.md` file.
4+
5+
When Process-PSModule builds the documentation site, this page becomes the landing page for the **Index Section** group in the navigation on GitHub Pages.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
function Get-NamedSectionTest {
2+
<#
3+
.SYNOPSIS
4+
Performs tests on a module.
5+
6+
.DESCRIPTION
7+
Performs tests on a module.
8+
9+
.EXAMPLE
10+
Get-NamedSectionTest -Name 'World'
11+
12+
"Hello, World!"
13+
#>
14+
[CmdletBinding()]
15+
param (
16+
# Name of the person to greet.
17+
[Parameter(Mandatory)]
18+
[string] $Name
19+
)
20+
Write-Output "Hello, $Name!"
21+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Named Section
2+
3+
This section's landing page is provided by a file named after its folder (`NamedSection.md`).
4+
5+
When Process-PSModule builds the documentation site, this page becomes the landing page for the **Named Section** group in the navigation on GitHub Pages.

tests/PSModuleTest.Tests.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,10 @@ Describe 'Module' {
2222
It 'Function: Test-PSModuleTest' {
2323
Test-PSModuleTest -Name 'World' | Should -Be 'Hello, World!'
2424
}
25+
It 'Function: Get-IndexSectionTest' {
26+
Get-IndexSectionTest -Name 'World' | Should -Be 'Hello, World!'
27+
}
28+
It 'Function: Get-NamedSectionTest' {
29+
Get-NamedSectionTest -Name 'World' | Should -Be 'Hello, World!'
30+
}
2531
}

0 commit comments

Comments
 (0)