{"id":19082350,"url":"https://github.com/starfallprojects/ahab","last_synced_at":"2026-06-24T05:31:43.908Z","repository":{"id":117642074,"uuid":"210588580","full_name":"StarfallProjects/ahab","owner":"StarfallProjects","description":"A Powershell 6.0 static site generator","archived":false,"fork":false,"pushed_at":"2019-11-11T20:57:43.000Z","size":22,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-05-24T06:13:46.645Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StarfallProjects.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2019-09-24T11:42:35.000Z","updated_at":"2024-07-04T12:37:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"8d427f70-5603-47f0-9ffb-b8d52a4488c9","html_url":"https://github.com/StarfallProjects/ahab","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/StarfallProjects/ahab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarfallProjects%2Fahab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarfallProjects%2Fahab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarfallProjects%2Fahab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarfallProjects%2Fahab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StarfallProjects","download_url":"https://codeload.github.com/StarfallProjects/ahab/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarfallProjects%2Fahab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34719097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"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":[],"created_at":"2024-11-09T02:42:58.759Z","updated_at":"2026-06-24T05:31:43.807Z","avatar_url":"https://github.com/StarfallProjects.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ahab\n\nA (very) basic static site generator in PowerShell\n\nThere is a simple example site available [here](https://github.com/StarfallProjects/ahab-example-site).\n\n## Install\n\nAhab requires PowerShell Core 6.0 minimum.\n\n1. Install [Powershell Core 6.2.3](https://github.com/PowerShell/PowerShell/releases/tag/v6.2.3)\n2. Download `ahab.ps1`\n\n## Run\n\nOption one:\n\n1. Place `ahab.ps1` in the root directory of your site\n2. Run from PowerShell with `./ahab.ps1`\n\nOption two:\n\n1. Place `ahab.ps1` in your PowerShell scripts directory (usually `/Powershell/scripts`)\n2. Configure your PowerShell profile:\n\n```ps\n# set scripts directory to your scripts folder\n$ps_script_dir = \"\u003cyour path\u003e\\Powershell\\scripts\"\n# alias the ahab command\nNew-Alias ahab $ps_script_dir/ahab.ps1\n```\n\n3. Run `ahab.ps1` from any directory with the `ahab` command.\n\n## Project structure\n\nAhab requires a simple project structure:\n- A `contents` directory, containing the markdown contents of your site. The structure of the pages and folders in `contents` will be the structure of the site.\n- A `snippets` directory, containing any HTML you want to use (for example, a `footer.html` that you include on every page)\n- An `assets` directory, containing your CSS, JavaScript, image files and other assets.\n- A `site` directory for the build output (Ahab creates this during build)\n\nYou can configure the names of these directories in the `config.json`.\n\nAhab treats `index.md` files as the homepage files of their directory. Other files are output as `filename\\index.html`.\n\nExample:\n```\nThis structure:\n\nProject\n|\n+-- contents\n|  |\n|  +-- index.md\n|  +-- aFile.md\n|  +-- myFolder\n|      |\n|      +-- index.md\n|      +-- anotherFile.md\n\nBecomes:\n\nProject\n|\n+-- site\n|  |\n|  +-- index.html\n|  +-- aFile\n|      |\n|      +-- index.html\n|  +-- myFolder\n|      |\n|      +-- index.html\n|      +-- anotherFile\n|          |\n|          +-- index.html\n```\n\nThis affects linking between pages. When writing links in your Markdown files, use `@BaseURL` and the path to the file from the root of your site:\n```\nThis is my example link to the file named [anotherFile](@BaseURL/myFolder/anotherFile) in the diagram above.\n\nThis is my [example link](@BaseURL/myFolder) to the index.md file in myFolder in the diagrame above.\n```\n\n## Configuration\n\nCreate a `config.json` in the root of your project.\n\nRequired:\n- Provide a base URL. This is the root URL of your site.\n\nOptional:\n- Configure the directories for your contents, snippets, assets and output.\n- Set default snippets.\n\n\nExample:\n```json\n{\n    \"baseURL\": \"https://example.com\",\n    \"contentDir\": \"src\",\n    \"buildDir\": \"dist\",\n    \"assetsDir\": \"bitsnbobs\",\n    \"snippetDir\": \"partials\",\n    \"defaultSnippets\": {\n        \"start\": \"head\",\n        \"end\": \"footer\"\n    }\n}\n```\n\nIf you do not use the optional configuration settings, Ahab uses the following defaults:\n```json\n{\n    \"contentDir\": \"contents\",\n    \"buildDir\": \"site\",\n    \"assetsDir\": \"assets\",\n    \"snippetDir\": \"snippets\"\n}\n```\n\n\n## Using snippets\n\nSnippets are pieces of HTML that you can include in your site's pages. There are two ways of including snippets.\n\n### With defaultSnippets in your configuration file\n\nUse the `defaultSnippets` configuration option to include snippets that you want on every page of your site. You can add one to the start of each page, and one to the end.\n\nExample:\n\nGiven the following `config.json`:\n```json\n{\n    \"defaultSnippets\": {\n        \"start\": \"head\",\n        \"end\": \"footer\"\n    }\n}\n```\n\nAhab takes `snippets/head.html` and adds the contents at the start of every page of your site, then takes `snippets/footer.html` and adds the contents at the end of every page of your site.\n\n\u003e **Warning**: Ahab does not add any HTML when converting your Markdown to HTML. In other words, without default snippets, your site will have no `\u003c!DOCTYPE\u003e`, no `\u003chead\u003e\u003c/head\u003e`, and so on. It is strongly recommended to use the default snippets to provide this, at a minimum:\n\n```html\n\u003c!-- start snippet, for example head.html --\u003e\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n    \u003chead\u003e\n        \u003ctitle\u003eYOUR SITE TITLE\u003c/title\u003e\n        \u003cmeta charset=\"utf-8\"\u003e\n        \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n    \u003c/head\u003e\n\u003cbody\u003e\n\n\u003c!-- end snippet, for example footer.html --\u003e\n\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n### With {{ use }} in Markdown\n\nAdd the following at any point in your Markdown to include an HTML snippet:\n\n```\n{{ use \u003csnippetName\u003e }}\n```\n\nFor example:\n```\n{{ use nav }}\n```\n\nAhab replaces the line with the contents of `snippets/nav.html`.\n\n## Including assets\n\nYour CSS, JavaScript, images and any other asset files are stored in the `assets` directory.\n\nTo include them in your snippets or Markdown files, use `@BaseURL` followed by the path to the asset.\n\nFor example, adding a CSS link to your `head.html` snippet:\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n    \u003chead\u003e\n        \u003ctitle\u003eYOUR SITE TITLE\u003c/title\u003e\n        \u003cmeta charset=\"utf-8\"\u003e\n        \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n        \u003clink rel=\"stylesheet\" type=\"text/css\" href=\"@BaseURL/assets/styles.css\" /\u003e\n    \u003c/head\u003e\n\u003cbody\u003e\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarfallprojects%2Fahab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstarfallprojects%2Fahab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarfallprojects%2Fahab/lists"}