Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# PowerShell.org Website

The community website for PowerShell.org, built with Hugo and Tailwind CSS. Hosts
podcasts, summit info, learning articles, community resources, and dedicated landing
pages for the open-source Modules that PowerShell.org stewards.

## Language

**Module**:
A PowerShell module that PowerShell.org stewards as an open-source project (e.g.
Plaster, PSDepend), given a dedicated landing page under `/modules/`. Capitalized
and used as a site section, "Module" means specifically these org-stewarded projects
— not the generic sense of "any PowerShell module you `Install-Module`", which is the
subject of the site as a whole.
_Avoid (for this concept)_: project, tool, package
23 changes: 23 additions & 0 deletions archetypes/modules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: '{{ replace .File.ContentBaseName "-" " " | title }}'
description: ""
layout: "module"
icon: "fas fa-cube"
weight: 50
repo: ""
gallery: ""
docs: ""
install:
- label: "PowerShell 7+"
command: ""
- label: "PowerShell 5.1"
command: ""
features:
- icon: "fas fa-star"
title: ""
body: ""
cmdlets:
- name: ""
description: ""
draft: true
---
7 changes: 7 additions & 0 deletions content/modules/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "Modules"
description: "Open-source PowerShell modules stewarded by the PowerShell.org community."
---

Tools built and maintained by the PowerShell.org community. Install them from the
PowerShell Gallery and dig into the source on GitHub.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
title: "Plaster"
description: "The template engine for PowerShell. Scaffold projects, modules, and files with customizable templates in XML or JSON."
layout: "plaster"
icon: "fas fa-layer-group"
weight: 10
aliases:
- "/plaster/"
---
73 changes: 73 additions & 0 deletions content/modules/psdepend/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: "PSDepend"
description: "A PowerShell dependency handler. Declare your dependencies in a .psd1 file and let Invoke-PSDepend resolve, install, import, and test them."
layout: "module"
icon: "fas fa-sitemap"
logo: "/images/modules/psdepend.svg"
weight: 20
repo: "https://github.com/PowerShellOrg/PSDepend"
gallery: "https://www.powershellgallery.com/packages/PSDepend"
docs: "https://github.com/PowerShellOrg/PSDepend/blob/main/docs/en-US/about_PSDepend.help.md"
install:
- label: "PowerShell 7+"
command: "Install-PSResource PSDepend"
- label: "PowerShell 5.1"
command: "Install-Module PSDepend"
features:
- icon: "fas fa-file-code"
title: "Declarative DependencyFiles"
body: "Declare every Dependency in a simple .psd1 file. Invoke-PSDepend finds your *.depend.psd1 and requirements.psd1 files automatically — think pip install -r or bundle install for PowerShell."
- icon: "fas fa-plug"
title: "Pluggable DependencyTypes"
body: "Each Dependency picks a DependencyType — PSGalleryModule, Git, Chocolatey, FileDownload and more — that selects the DependencyScript handling it. Register your own to extend PSDepend."
- icon: "fas fa-list-check"
title: "Install, Test, or Import"
body: "Run a DependencyFile with any combination of the Install, Test, and Import PSDependActions — verify an environment in CI, or hydrate one from scratch."
- icon: "fas fa-tags"
title: "Tag-based selection"
body: "Tag your Dependencies and pass -Tags to Invoke-PSDepend to resolve just the subset you need for a given task or pipeline stage."
- icon: "fas fa-diagram-project"
title: "Ordered Prerequisites"
body: "Express ordering constraints between Dependencies with DependsOn. PSDepend resolves them into topological order before anything is installed."
- icon: "fas fa-bullseye"
title: "Flexible Target"
body: "Send a Dependency to a scope (CurrentUser, AllUsers) or any filesystem path via Target. The DependencyScript branches on whichever you give it."
cmdlets:
- name: "Invoke-PSDepend"
description: "The main entry point. Resolves a DependencyFile and installs, tests, and/or imports its Dependencies."
- name: "Get-Dependency"
description: "Parse a DependencyFile into typed Dependency objects without acting on them — handy for inspection and debugging."
- name: "Get-PSDependType"
description: "List the registered DependencyTypes and the DependencyScript each one maps to."
- name: "Get-PSDependScript"
description: "Resolve the DependencyScript that will handle a given DependencyType."
- name: "Install-Dependency"
description: "Run only the Install PSDependAction for a Dependency."
- name: "Test-Dependency"
description: "Run only the Test PSDependAction to check whether a Dependency is already satisfied."
---

## Declare your dependencies

Store your Dependencies in a PowerShell data file named `*.depend.psd1` or
`requirements.psd1`. The simplest form maps a module name to a version:

{{< terminal title="requirements.psd1" lang="powershell" >}}
@{
psake = 'latest'
Pester = 'latest'
BuildHelpers = '0.0.20'
PSDeploy = '0.1.21'
}
{{< /terminal >}}

Then resolve everything in one call:

{{< terminal title="PowerShell" lang="powershell" >}}
Import-Module PSDepend
Invoke-PSDepend -Path .\requirements.psd1
{{< /terminal >}}

Need more control? Expand any entry into a full Dependency to set its
`DependencyType`, `Target`, `Tags`, or `DependsOn` ordering — and add a
`PSDependOptions` block to apply defaults across the whole DependencyFile.
32 changes: 32 additions & 0 deletions docs/adr/0001-module-landing-pages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Module landing pages: hybrid layout under a `/modules/` section

We host dedicated landing pages for the open-source PowerShell modules PowerShell.org
stewards (see [[Module]] in `CONTEXT.md`). Plaster's page is a hand-authored, ~430-line
bespoke Hugo layout. To add more modules (PSDepend first) without copy-pasting that per
module, we adopt a **hybrid**: a generic, front-matter-driven `module` layout is the
default for new modules, and the standard Hugo `layout:` key is an escape hatch so a
flagship module can keep a bespoke page (Plaster stays on `_default/plaster.html`).

The modules live under a `/modules/` section with a card-grid index (built by
`layouts/modules/list.html` ranging over the child pages, mirroring the existing
`community` list). A single "Modules" item replaces "Plaster" in the main nav. Plaster
moves from `/plaster/` to `/modules/plaster/` with `aliases: ["/plaster/"]` to preserve
the published URL.

## Considered options

- **Bespoke per module** — rejected: ~430 lines of duplicated, drifting HTML per module.
- **Generic only** (convert Plaster too) — rejected: loses Plaster's bespoke showcase
(ASCII hero, JSON-vs-XML comparison) for a lowest-common-denominator template.
- **Hybrid** — chosen: cheap to add modules, expressive where it earns its keep.

We named the section **"Module"** despite the collision with PowerShell's generic sense
of the word; `CONTEXT.md` carries the disambiguation.

## Consequences

- Every module page **must** set `layout:` (`module` or a bespoke name). Module pages are
branch bundles under `modules/`, so without an explicit layout they would fall through
to the section's `list.html`. The `modules` archetype bakes the layout key in.
- Cmdlet references on generic pages are a curated 3–6 command highlight in front matter,
not an ingestion of each module's platyPS docs — avoids cross-repo build coupling.
21 changes: 19 additions & 2 deletions hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ menu:
weight: 50
params:
hasChildren: true
- name: "Plaster"
url: "/plaster/"
childMenu: community
- name: "Modules"
url: "/modules/"
weight: 60
params:
hasChildren: true
childMenu: modules
community:
- name: "Learning"
url: "/learning/"
Expand Down Expand Up @@ -83,6 +87,19 @@ menu:
params:
icon: "fab fa-discord"
description: "Searchable archive of conversations from our Discord server."
modules:
- name: "Plaster"
url: "/modules/plaster/"
weight: 10
params:
icon: "fas fa-layer-group"
description: "The template engine for PowerShell — scaffold projects, modules, and files."
- name: "PSDepend"
url: "/modules/psdepend/"
weight: 20
params:
icon: "fas fa-sitemap"
description: "Declarative PowerShell dependency handler driven by a .psd1 file."

# Site parameters
params:
Expand Down
1 change: 1 addition & 0 deletions static/images/modules/psdepend.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions themes/powershell-community/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
font-family: 'Cascadia Code', 'Consolas', monospace;
}

/* Neutralize .prose pre styling inside the terminal shortcode so the
terminal chrome renders flush; Prism handles token colors. */
.ps-terminal pre { background: transparent; color: #ccc; margin: 0; border-radius: 0; padding: 1.25rem; overflow-x: auto; }

.hero-pattern {
background: linear-gradient(135deg, #0078D4 0%, #00BCF2 100%);
position: relative;
Expand Down
138 changes: 138 additions & 0 deletions themes/powershell-community/layouts/_default/module.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
{{ define "main" }}

<!-- Hero Section -->
<section class="hero-pattern py-20 lg:py-28 relative overflow-hidden">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10">
<div class="text-center text-white animate-fade-in">
{{ with .Params.logo }}
<div class="mb-6 flex justify-center">
<span class="inline-flex items-center justify-center w-24 h-24 bg-white rounded-2xl shadow-lg p-4">
<img src="{{ . }}" alt="{{ $.Title }} logo" class="w-full h-full object-contain">
</span>
</div>
{{ else }}{{ with .Params.icon }}
<div class="mb-6">
<i class="{{ . }} text-5xl lg:text-6xl opacity-90"></i>
</div>
{{ end }}{{ end }}
<h1 class="text-4xl lg:text-6xl gotham-black mb-6">{{ .Title }}</h1>
{{ with .Params.description }}
<p class="text-xl lg:text-2xl opacity-90 max-w-3xl mx-auto mb-10 gotham-medium">{{ . }}</p>
{{ end }}
<div class="flex flex-col sm:flex-row gap-4 justify-center">
{{ with .Params.repo }}
<a href="{{ . }}" target="_blank" rel="noopener"
class="inline-flex items-center bg-white text-blue-700 px-8 py-4 rounded-lg font-bold text-lg hover:bg-gray-100 transition-all duration-200 shadow-lg hover:shadow-xl">
<i class="fab fa-github mr-3"></i>View Source
</a>
{{ end }}
{{ if .Params.install }}
<a href="#install"
class="inline-flex items-center bg-transparent border-2 border-white text-white px-8 py-4 rounded-lg font-bold text-lg hover:bg-white hover:bg-opacity-10 transition-all duration-200">
<i class="fas fa-download mr-3"></i>Install
</a>
{{ end }}
</div>
</div>
</div>
</section>

<!-- Install Banner -->
{{ with .Params.install }}
<section id="install" class="powershell-dark py-12">
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 space-y-4">
{{ range . }}
<div class="code-terminal rounded-lg p-6">
<div class="flex items-center mb-3">
<div class="flex space-x-2 mr-4">
<div class="w-3 h-3 rounded-full bg-red-500"></div>
<div class="w-3 h-3 rounded-full bg-yellow-500"></div>
<div class="w-3 h-3 rounded-full bg-green-500"></div>
</div>
<span class="text-gray-400 text-sm font-mono">{{ with .label }}{{ . }}{{ else }}PowerShell{{ end }}</span>
</div>
<code class="text-green-400 font-mono text-lg">{{ .command }}</code>
</div>
{{ end }}
</div>
</section>
{{ end }}

<!-- Feature Cards -->
{{ with .Params.features }}
<section class="py-20 bg-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="grid gap-8 sm:grid-cols-2 lg:grid-cols-3">
{{ range . }}
<div class="bg-gray-50 rounded-xl p-8 border border-gray-200 hover:border-blue-400 hover:shadow-lg transition-all duration-300">
<div class="w-14 h-14 bg-blue-100 rounded-xl flex items-center justify-center mb-6">
<i class="{{ with .icon }}{{ . }}{{ else }}fas fa-star{{ end }} text-2xl text-blue-600"></i>
</div>
<h3 class="text-xl font-bold text-gray-900 mb-3">{{ .title }}</h3>
<p class="text-gray-600 leading-relaxed">{{ .body }}</p>
</div>
{{ end }}
</div>
</div>
</section>
{{ end }}

<!-- Free-form body content -->
{{ with .Content }}
<section class="py-16 bg-gray-50">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="prose prose-lg max-w-4xl mx-auto">{{ . }}</div>
</div>
</section>
{{ end }}

<!-- Cmdlet Reference -->
{{ with .Params.cmdlets }}
<section class="py-20 bg-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="text-center mb-16">
<h2 class="text-3xl lg:text-4xl gotham-bold text-gray-900 mb-4">Commands</h2>
<p class="text-xl text-gray-600 max-w-2xl mx-auto">The commands you'll reach for most.</p>
</div>
<div class="grid gap-6 sm:grid-cols-2">
{{ range . }}
<div class="bg-gray-50 rounded-xl p-8 border border-gray-200 hover:border-blue-400 hover:shadow-md transition-all duration-200">
<div class="flex items-center mb-4">
<code class="text-lg font-bold text-blue-700 font-mono">{{ .name }}</code>
</div>
<p class="text-gray-600">{{ .description }}</p>
</div>
{{ end }}
</div>
</div>
</section>
{{ end }}

<!-- CTA Section -->
<section class="powershell-blue py-20">
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center text-white">
<h2 class="text-3xl lg:text-4xl gotham-bold mb-6">Get started with {{ .Title }}</h2>
<div class="flex flex-col sm:flex-row gap-4 justify-center">
{{ with .Params.gallery }}
<a href="{{ . }}" target="_blank" rel="noopener"
class="inline-flex items-center bg-white text-blue-700 px-8 py-4 rounded-lg font-bold text-lg hover:bg-gray-100 transition-all duration-200 shadow-lg">
<i class="fas fa-box-open mr-3"></i>PowerShell Gallery
</a>
{{ end }}
{{ with .Params.repo }}
<a href="{{ . }}" target="_blank" rel="noopener"
class="inline-flex items-center bg-transparent border-2 border-white text-white px-8 py-4 rounded-lg font-bold text-lg hover:bg-white hover:bg-opacity-10 transition-all duration-200">
<i class="fab fa-github mr-3"></i>View Source
</a>
{{ end }}
{{ with .Params.docs }}
<a href="{{ . }}" target="_blank" rel="noopener"
class="inline-flex items-center bg-transparent border-2 border-white text-white px-8 py-4 rounded-lg font-bold text-lg hover:bg-white hover:bg-opacity-10 transition-all duration-200">
<i class="fas fa-book mr-3"></i>Documentation
</a>
{{ end }}
</div>
</div>
</section>

{{ end }}
20 changes: 20 additions & 0 deletions themes/powershell-community/layouts/_shortcodes/terminal.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{- /* Reusable terminal-chrome code block. Matches the styled blocks on the Plaster page.
Usage:
{{< terminal title="requirements.psd1" lang="powershell" >}}
@{ psake = 'latest' }
{{< /terminal >}}
Highlighting is handled client-side by Prism via the language-* class. */ -}}
{{- $lang := .Get "lang" | default "powershell" -}}
{{- $title := .Get "title" | default "PowerShell" -}}
{{- $code := trim .Inner "\n" -}}
<div class="code-terminal ps-terminal rounded-xl overflow-hidden shadow-xl my-6">
<div class="flex items-center px-4 py-3 border-b border-gray-700">
<div class="flex space-x-2 mr-4">
<div class="w-3 h-3 rounded-full bg-red-500"></div>
<div class="w-3 h-3 rounded-full bg-yellow-500"></div>
<div class="w-3 h-3 rounded-full bg-green-500"></div>
</div>
<span class="text-gray-400 text-sm font-mono">{{ $title }}</span>
</div>
<pre class="text-sm leading-relaxed"><code class="language-{{ $lang }}">{{ $code }}</code></pre>
</div>
Loading
Loading