{"id":17867098,"url":"https://github.com/cdhunt/format-document","last_synced_at":"2025-10-04T23:10:42.499Z","repository":{"id":213335944,"uuid":"733619651","full_name":"cdhunt/Format-Document","owner":"cdhunt","description":"Helper for formatting web documents in Markdown, Html, or Confluence.","archived":false,"fork":false,"pushed_at":"2024-02-02T13:34:31.000Z","size":87,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-13T23:41:54.041Z","etag":null,"topics":["confluence","devops-toolkit","documentation-tool","html","markdown","powershell","powershell-module"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdhunt.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-12-19T18:31:39.000Z","updated_at":"2024-12-20T16:49:17.000Z","dependencies_parsed_at":"2023-12-20T13:54:26.251Z","dependency_job_id":"cb9c41ed-6ab3-466b-a39d-e329c5c3258c","html_url":"https://github.com/cdhunt/Format-Document","commit_stats":null,"previous_names":["cdhunt/format-document"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cdhunt/Format-Document","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdhunt%2FFormat-Document","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdhunt%2FFormat-Document/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdhunt%2FFormat-Document/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdhunt%2FFormat-Document/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdhunt","download_url":"https://codeload.github.com/cdhunt/Format-Document/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdhunt%2FFormat-Document/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278386130,"owners_count":25978113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["confluence","devops-toolkit","documentation-tool","html","markdown","powershell","powershell-module"],"created_at":"2024-10-28T09:43:51.469Z","updated_at":"2025-10-04T23:10:42.485Z","avatar_url":"https://github.com/cdhunt.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Format-Document\n\nThis module contains an HTML-like DSL for dynamically constructing documents using PowerShell.\nThe same template can be rendered to any one of the following formats which render as similarly as possible.\n\nFormats supported:\n\n- Markdown ([GitHub-flavored](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax))\n- [Confluence Storage Format](https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html)\n- Html (with [Bootstrap](https://getbootstrap.com/) class decorations)\n\nYou can use this to automatically maintain and synchronize documentation in multiple formats such as READMEs and Confluence Wiki.\n\n## CI Status\n\n![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/cdhunt/Format-Document/powershell.yml?style=flat\u0026logo=github)\n[![Testspace pass ratio](https://img.shields.io/testspace/pass-ratio/cdhunt/cdhunt%3AFormat-Document/main)](https://cdhunt.testspace.com/projects/67973/spaces)\n[![PowerShell Gallery](https://img.shields.io/powershellgallery/v/Format-Document.svg?color=%235391FE\u0026label=PowerShellGallery\u0026logo=powershell\u0026style=flat)](https://www.powershellgallery.com/packages/Format-Document)\n\n![Build history](https://buildstats.info/github/chart/cdhunt/Format-Document?branch=main)\n\n## Install\n\n[powershellgallery.com/packages/Format-Document](https://www.powershellgallery.com/packages/Format-Document)\n\n`Install-Module -Name Format-Document` or `Install-PSResource -Name Format-Document`\n\n![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/httpunitps?color=%235391FE\u0026style=flat)\n\n## Docs\n\n[Full Docs](docs)\n\n### Examples\n\nGenerate a document in Markdown.\nEach element accepts either a ScriptBlock or a String.\nUse a ScriptBlock if you want more powerful text generation.\nUnenclosed text will be passed through as is.\n\n```powershell\nNew-Document -Type Markdown {\n    H1 \"My Text\"\n    H2 { \"Heading 2\" }\n    P { Get-Date }\n    P {\n        \"normal text\"\n        B \"bold text cmdlet\"\n        \".\"\n        Link \"link Text\" \"https://google.com\"\n    }\n    Table {\n        TR {\n            TH \"Heading 1\",\"Heading 2\"\n        }\n        TR {\n            TD -Text \"Fun\"\n            TD -Text \"Moar Fun\"\n        }\n        TR {\n            TD \"Item 1\",\"Item 2\"\n        }\n    }\n}\n```\n\n![markdown example](docs/image/markdown.png)\n\n---\n\nUsing the same template and changing `-Type` parameter to `Confluence` renders the document in [Confluence Storage Format](https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html).\n\n![confluence example](docs/image/confluence.png)\n\nYou can use [ConfluencePS](https://www.powershellgallery.com/packages/ConfluencePS) to publish the content.\n\n```powershell\n$page = Get-ConfluencePage -PageID 123456789\n$doc = New-Document -Type Confluence { ... }\n\n$page.Body = $doc\n$page | Set-ConfluencePage\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdhunt%2Fformat-document","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdhunt%2Fformat-document","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdhunt%2Fformat-document/lists"}