Static Wiki Site via Quartz
Included the static site generator Quartz and customized it to generate a wiki using the contents of the Obsidian Vault
This commit is contained in:
parent
d5d74105bb
commit
6127440e57
210 changed files with 34936 additions and 23 deletions
37
scripts/quartz/quartz.ps1
Normal file
37
scripts/quartz/quartz.ps1
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
param(
|
||||
[ValidateSet("build", "dev")]
|
||||
[string]$Command = "dev"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$repoRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
|
||||
$quartzRoot = Join-Path $repoRoot "quartz-site"
|
||||
$portableNodeRoot = Join-Path $repoRoot ".tools\node-v24.15.0-win-x64"
|
||||
$portableNpm = Join-Path $portableNodeRoot "npm.cmd"
|
||||
|
||||
if (Test-Path $portableNpm) {
|
||||
$npm = $portableNpm
|
||||
$env:PATH = "$portableNodeRoot;$env:PATH"
|
||||
} else {
|
||||
$npmCommand = Get-Command npm -ErrorAction SilentlyContinue
|
||||
if (-not $npmCommand) {
|
||||
throw "npm was not found. Install Node.js or restore the portable runtime under .tools."
|
||||
}
|
||||
|
||||
$npm = $npmCommand.Source
|
||||
}
|
||||
|
||||
$env:npm_config_cache = Join-Path $repoRoot ".npm-cache"
|
||||
|
||||
$scriptArgs = switch ($Command) {
|
||||
"build" { @("run", "build") }
|
||||
"dev" { @("run", "dev") }
|
||||
}
|
||||
|
||||
Push-Location $quartzRoot
|
||||
try {
|
||||
& $npm @scriptArgs
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
Loading…
Reference in a new issue