From 870edd08d6c0fa04d20476c98cb9c96ae992182c Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Fri, 10 Jul 2026 16:15:14 +0200 Subject: [PATCH 1/3] 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). --- .../IndexSection/Get-IndexSectionTest.ps1 | 21 +++++++++++++++++++ src/functions/public/IndexSection/index.md | 5 +++++ .../NamedSection/Get-NamedSectionTest.ps1 | 21 +++++++++++++++++++ .../public/NamedSection/NamedSection.md | 5 +++++ tests/PSModuleTest.Tests.ps1 | 6 ++++++ 5 files changed, 58 insertions(+) create mode 100644 src/functions/public/IndexSection/Get-IndexSectionTest.ps1 create mode 100644 src/functions/public/IndexSection/index.md create mode 100644 src/functions/public/NamedSection/Get-NamedSectionTest.ps1 create mode 100644 src/functions/public/NamedSection/NamedSection.md diff --git a/src/functions/public/IndexSection/Get-IndexSectionTest.ps1 b/src/functions/public/IndexSection/Get-IndexSectionTest.ps1 new file mode 100644 index 0000000..9c36ed5 --- /dev/null +++ b/src/functions/public/IndexSection/Get-IndexSectionTest.ps1 @@ -0,0 +1,21 @@ +function Get-IndexSectionTest { + <# + .SYNOPSIS + Performs tests on a module. + + .DESCRIPTION + Performs tests on a module. + + .EXAMPLE + Get-IndexSectionTest -Name 'World' + + "Hello, World!" + #> + [CmdletBinding()] + param ( + # Name of the person to greet. + [Parameter(Mandatory)] + [string] $Name + ) + Write-Output "Hello, $Name!" +} diff --git a/src/functions/public/IndexSection/index.md b/src/functions/public/IndexSection/index.md new file mode 100644 index 0000000..7b29823 --- /dev/null +++ b/src/functions/public/IndexSection/index.md @@ -0,0 +1,5 @@ +# Index Section + +This section's landing page is provided by an `index.md` file. + +When Process-PSModule builds the documentation site, this page becomes the landing page for the **Index Section** group in the navigation on GitHub Pages. diff --git a/src/functions/public/NamedSection/Get-NamedSectionTest.ps1 b/src/functions/public/NamedSection/Get-NamedSectionTest.ps1 new file mode 100644 index 0000000..4ec9f6e --- /dev/null +++ b/src/functions/public/NamedSection/Get-NamedSectionTest.ps1 @@ -0,0 +1,21 @@ +function Get-NamedSectionTest { + <# + .SYNOPSIS + Performs tests on a module. + + .DESCRIPTION + Performs tests on a module. + + .EXAMPLE + Get-NamedSectionTest -Name 'World' + + "Hello, World!" + #> + [CmdletBinding()] + param ( + # Name of the person to greet. + [Parameter(Mandatory)] + [string] $Name + ) + Write-Output "Hello, $Name!" +} diff --git a/src/functions/public/NamedSection/NamedSection.md b/src/functions/public/NamedSection/NamedSection.md new file mode 100644 index 0000000..6adff38 --- /dev/null +++ b/src/functions/public/NamedSection/NamedSection.md @@ -0,0 +1,5 @@ +# Named Section + +This section's landing page is provided by a file named after its folder (`NamedSection.md`). + +When Process-PSModule builds the documentation site, this page becomes the landing page for the **Named Section** group in the navigation on GitHub Pages. diff --git a/tests/PSModuleTest.Tests.ps1 b/tests/PSModuleTest.Tests.ps1 index b856855..7b06f67 100644 --- a/tests/PSModuleTest.Tests.ps1 +++ b/tests/PSModuleTest.Tests.ps1 @@ -22,4 +22,10 @@ Describe 'Module' { It 'Function: Test-PSModuleTest' { Test-PSModuleTest -Name 'World' | Should -Be 'Hello, World!' } + It 'Function: Get-IndexSectionTest' { + Get-IndexSectionTest -Name 'World' | Should -Be 'Hello, World!' + } + It 'Function: Get-NamedSectionTest' { + Get-NamedSectionTest -Name 'World' | Should -Be 'Hello, World!' + } } From e11bef4e0ea25c38d3518a889e3f2327a22e5b2f Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 11 Jul 2026 12:44:46 +0200 Subject: [PATCH 2/3] Adopt Process-PSModule v6.1.2 Bumps the workflow pin v6.1.1 -> v6.1.2 (d4020f3, #377). v6.1.2 exposes caller-provided TestData to the module test jobs via Install-PSModuleHelpers/Import-TestData (removing the consumer-side Expose-TestData.ps1 requirement) and honors the bump label during version resolution (Resolve-PSModuleVersion v1.1.4). --- .github/workflows/Process-PSModule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Process-PSModule.yml b/.github/workflows/Process-PSModule.yml index a70f92d..0db7f58 100644 --- a/.github/workflows/Process-PSModule.yml +++ b/.github/workflows/Process-PSModule.yml @@ -27,7 +27,7 @@ permissions: jobs: Process-PSModule: - uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@ea19a3eb1293246d1b00e4faae1544442c3be0ec # v6.1.1 + uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@d4020f3c9c3621cebae5d8bf4ffaf10f55c1784a # v6.1.2 secrets: APIKEY: ${{ secrets.APIKEY }} # Showcase: send data down to the module tests (see tests/Environment.Tests.ps1). From 7478dd5f200b7ed432d025c182c2334f5fdfd7b0 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 11 Jul 2026 13:37:23 +0200 Subject: [PATCH 3/3] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20[Maintenance]:=20Remov?= =?UTF-8?q?e=20outdated=20comments=20from=20Process-PSModule=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Process-PSModule.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/Process-PSModule.yml b/.github/workflows/Process-PSModule.yml index 0db7f58..510eea3 100644 --- a/.github/workflows/Process-PSModule.yml +++ b/.github/workflows/Process-PSModule.yml @@ -30,14 +30,6 @@ jobs: uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@d4020f3c9c3621cebae5d8bf4ffaf10f55c1784a # v6.1.2 secrets: APIKEY: ${{ secrets.APIKEY }} - # Showcase: send data down to the module tests (see tests/Environment.Tests.ps1). - # TestData is a single-line JSON object with optional "secrets" (masked in logs) and - # "variables" (not masked) maps. Every entry is exposed to the module test jobs as - # $env:. Reference a repository secret with the direct "${{ secrets.NAME }}" - # form (single-line values, no quotes or backslashes) and a repository variable with - # ${{ toJSON(vars.NAME) }} so any characters are encoded safely. The folded ">-" scalar - # keeps the whole value on one line so GitHub registers a single log mask. Omit - # TestData entirely when your tests need no data. TestData: >- { "secrets": { "TEST_SECRET": "${{ secrets.TEST_SECRET }}" }, "variables": { "TEST_VARIABLE": ${{ toJSON(vars.TEST_VARIABLE) }} } }