{"id":31578355,"url":"https://github.com/bosonware-technologies/webkit","last_synced_at":"2025-10-05T19:57:06.725Z","repository":{"id":317210633,"uuid":"1066473807","full_name":"BosonWare-Technologies/WebKit","owner":"BosonWare-Technologies","description":"WebKit is a hybrid Markdown + HTML site engine written in C#.   It transforms simple `.md` pages into clean, responsive websites — with built-in layouts, dark/light mode, and expression support.","archived":false,"fork":false,"pushed_at":"2025-09-29T15:23:50.000Z","size":0,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-29T15:44:59.614Z","etag":null,"topics":["blog-engine","bosonware","builder","cli","content-generator","cross-platform","documentation-generator","dotnet-tool","fast","html","jamstack","lightweight","markdown","markdown-to-html","site-generator","static-site","static-website","web-development","webkit","website"],"latest_commit_sha":null,"homepage":"https://bosonware.org/foundation","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BosonWare-Technologies.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-29T14:30:57.000Z","updated_at":"2025-09-29T15:23:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"ba6537d5-d263-4fac-99b0-2db636e56356","html_url":"https://github.com/BosonWare-Technologies/WebKit","commit_stats":null,"previous_names":["bosonware-technologies/webkit"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/BosonWare-Technologies/WebKit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BosonWare-Technologies%2FWebKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BosonWare-Technologies%2FWebKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BosonWare-Technologies%2FWebKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BosonWare-Technologies%2FWebKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BosonWare-Technologies","download_url":"https://codeload.github.com/BosonWare-Technologies/WebKit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BosonWare-Technologies%2FWebKit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278510917,"owners_count":25998997,"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-05T02:00:06.059Z","response_time":54,"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":["blog-engine","bosonware","builder","cli","content-generator","cross-platform","documentation-generator","dotnet-tool","fast","html","jamstack","lightweight","markdown","markdown-to-html","site-generator","static-site","static-website","web-development","webkit","website"],"created_at":"2025-10-05T19:57:05.663Z","updated_at":"2025-10-05T19:57:06.719Z","avatar_url":"https://github.com/BosonWare-Technologies.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebKit\n\n**WebKit** is a hybrid Markdown + HTML site engine written in **C#**.  \nIt transforms simple `.md` pages into clean, responsive websites — with built-in layouts, dark/light mode, and expression support.\n\n---\n\n## ✨ Features\n- Responsive layout 📱\n- Dark 🌙 + Light ☀️ mode\n- Hybrid **Markdown + HTML** syntax\n- Simple **expressions** with Getters + Setters\n- Configurable via `webkit.json`\n\n---\n\n## 📦 Installation\n\n### Using .NET Tool\n```bash\ndotnet tool install -g Boson.WebKit\n```\n\n---\n\n## ⚡ Quick Start\n\n```bash\nwebkit init -n MySite\ncd MySite\nwebkit build\nwebkit serve\n```\n\nOpen [http://localhost:3000](http://localhost:3000) 🎉\n\n---\n\n## ⚙️ Configuration\n\n`webkit.json`\n\n```json\n{\n  \"Properties\": {\n    \"Name\": \"MySite\",\n    \"Author\": \"CodingBoson\"\n  }\n}\n```\n\nAccess with expressions:\n\n```markdown\n# Welcome to {{ .Name }} by {{ .Author }}\n```\n\n---\n\n## 📂 Project Structure\n\n```\nMySite/\n ├─ build/                 # Generated output\n ├─ Resources/             # All resources live here\n │   ├─ Pages/             # Markdown + hybrid HTML pages\n │   ├─ Shared/            # Reusable components\n │   ├─ Static/            # CSS, JS, images\n │   └─ Layout.html        # Global layout\n ├─ .gitignore\n ├─ README.md\n └─ webkit.json            # Site config\n```\n\n---\n\n## 🛠 Commands\n\n```bash\nwebkit init \u003cName\u003e     # Create new site\nwebkit build           # Build static site\nwebkit serve           # Run local dev server\nwebkit clean           # Clear build output\n```\n\n---\n\n# Layout\n\nThe `Layout.html` in `Resources/` defines the global wrapper for your pages.  \nEvery page gets rendered **inside** this layout.\n\nExample:\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n  \u003ctitle\u003e{{ .Title }}\u003c/title\u003e\n  \u003clink rel=\"stylesheet\" href=\"/webkit.css\"\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  {{ .NavBar }}\n  \u003cmain\u003e\n    {{ .Content }}\n  \u003c/main\u003e\n  \u003cfooter\u003e\n    \u003cp\u003e© {{ .Name }} by {{ .Author }}\u003c/p\u003e\n  \u003c/footer\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n````\n\n---\n\n## Shared Components\n\nIn WebKit, **shared components** are just **resources** inside `Resources/Shared/`.\n\nTo use them:\n\n1. Create a file in `Resources/Shared/` (e.g. `NavBar.html`)\n2. Reference it in `webkit.json`\n3. Use it as a property in any page or layout\n\n### Example\n\n**`Resources/Shared/NavBar.html`**\n\n```html\n\u003cnav\u003e\n  \u003ca href=\"/\"\u003eHome\u003c/a\u003e\n  \u003ca href=\"/About.html\"\u003eAbout\u003c/a\u003e\n\u003c/nav\u003e\n```\n\n**`webkit.json`**\n\n```json5\n{\n  \"Properties\": {\n    \"Name\": \"MySite\",\n    \"Author\": \"CodingBoson\",\n    // First, define a property in the `webkit.json` that references the shared HTML/markdown file. \"NavBar\": \"@Shared/NavBar.html\"\n    \"NavBar\": \"@Shared/NavBar.html\"\n  }\n}\n```\n\n**`Layout.html`**\n\n```html\n\u003cbody\u003e\n  {{ .NavBar }}\n  \u003cmain\u003e{{ .Content }}\u003c/main\u003e\n\u003c/body\u003e\n```\n\n---\n\n## Philosophy\n\n* **No new syntax** → Components are just properties.\n* **No hidden magic** → WebKit doesn’t treat `Shared/` specially. It’s just a folder convention.\n* **Uniform API** → Whether you use `.Name`, `.Author`, or `.NavBar`, it’s the same expression system.\n\nThis makes WebKit:\n\n* **Predictable** → All resources behave the same\n* **Simple** → No separate “component language”\n* **Composable** → You can nest and reuse shared parts freely\n\n---\n\n# 📑 Expressions\n\n````markdown\n# Expressions\n\nWebKit supports **expressions** inside Markdown and HTML.  \nThey are written with double curly braces:\n\n```markdown\n{{ .Property }}\n````\n\n---\n\n## 1. Getters\n\nA **Getter** inserts the value of a property.\n\nExample:\n\n```markdown\nWelcome to {{ .Name }} by {{ .Author }}\n```\n\nWith this config:\n\n```json\n{\n  \"Properties\": {\n    \"Name\": \"MySite\",\n    \"Author\": \"CodingBoson\"\n  }\n}\n```\n\nResult:\n\n```html\nWelcome to MySite by CodingBoson\n```\n\n---\n\n## 2. Shared Resource References\n\nProperties in `webkit.json` can point to other resources, like files in `Resources/Shared/`.\n\n```json\n{\n  \"Properties\": {\n    \"NavBar\": \"@Shared/NavBar.html\"\n  }\n}\n```\n\nNow you can use:\n\n```markdown\n{{ .NavBar }}\n```\n\nWebKit will inline the content of `Resources/Shared/NavBar.html`.\n\n---\n\n## 3. SetterExpressions\n\nA **SetterExpression** allows you to define or override a property inside a page.\n\nSyntax:\n\n```markdown\n{{ .Property = value }}\n```\n\nExample:\n\n```markdown\n{{ .Title = .Name Home }}\n\n# Welcome to {{ .Name }}\n```\n\nHere:\n\n* `.Title` is set to `\"MySite Home\"`\n* It can be used later in `Layout.html` (e.g., inside `\u003ctitle\u003e`)\n\n---\n\n## 4. Concatenation in Setters\n\nSetters can concatenate multiple values:\n\n```markdown\n{{ .Title = .Name \" - \" .Author }}\n```\n\nWith:\n\n```json\n{\n  \"Properties\": {\n    \"Name\": \"MySite\",\n    \"Author\": \"CodingBoson\"\n  }\n}\n```\n\nResult:\n\n```html\n\u003ctitle\u003eMySite - CodingBoson\u003c/title\u003e\n```\n\n---\n\n## 5. Resolution Order\n\nWhen WebKit resolves an expression:\n\n1. **Check runtime Setters** (defined in the current page)\n2. **Check `webkit.json` Properties**\n3. **If value is a resource reference** (e.g., `@Shared/...`), load its content\n4. **Fallback** → leave the expression untouched\n\nThis makes expressions predictable:\n\n* Pages can override defaults (via Setters)\n* Layouts and Shared resources stay flexible\n\n---\n\n## 6. Escaping Expressions\n\nTo write an expression literally (without evaluating it), escape with `\\\\`:\n\n```markdown\n\\\\{{ .Author }}\n```\n\nResult:\n\n```md\n{{ .Author }}\n```\n\n---\n\n## Philosophy\n\nExpressions are the **glue of WebKit**:\n\n* Getters → read values\n* Setters → define or override values\n* References → pull in resources\n* All unified under one minimal syntax\n\n👉 No custom DSL.\n👉 No templates-within-templates.\n👉 Just properties + resources, flowing through the build pipeline.\n\n---\n\n## 📜 License\n\nGPL-3.0 © **BosonWare Technologies**\n\n## Release Notes:\n[Check the Changelog for more details.](/CHANGELOG.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbosonware-technologies%2Fwebkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbosonware-technologies%2Fwebkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbosonware-technologies%2Fwebkit/lists"}