{"id":17014530,"url":"https://github.com/silversquirl/vs3","last_synced_at":"2025-04-22T13:46:12.307Z","repository":{"id":117179752,"uuid":"123993667","full_name":"silversquirl/vs3","owner":"silversquirl","description":"vktec's simple site system: Static sites, but simpler and not static","archived":false,"fork":false,"pushed_at":"2018-03-08T17:01:52.000Z","size":5,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-14T03:51:17.792Z","etag":null,"topics":["bash","site-generator"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/silversquirl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-03-05T23:47:02.000Z","updated_at":"2025-02-01T15:45:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"a93fd37e-4320-47f0-9387-17a20df56f7f","html_url":"https://github.com/silversquirl/vs3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silversquirl%2Fvs3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silversquirl%2Fvs3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silversquirl%2Fvs3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silversquirl%2Fvs3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/silversquirl","download_url":"https://codeload.github.com/silversquirl/vs3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250251267,"owners_count":21399789,"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","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":["bash","site-generator"],"created_at":"2024-10-14T06:25:13.818Z","updated_at":"2025-04-22T13:46:12.301Z","avatar_url":"https://github.com/silversquirl.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vs\u003csup\u003e3\u003c/sup\u003e\n\nvktec's simple site system.\n\n## What?\n\nvs\u003csup\u003e3\u003c/sup\u003e is the spiritual successor to [vsg][vsg], my super simple\nstatic site generator written in Python. vs\u003csup\u003e3\u003c/sup\u003e aims to be even\nmore simple, but also more powerful because it supports dynamic content.\n\n[vsg]: https://github.com/vktec/vsg\n\n## Usage\n\nvs\u003csup\u003e3\u003c/sup\u003e is written in Bash, and its templating is based on Bash.\nHowever, you do not need to know how to use Bash to use vs\u003csup\u003e3\u003c/sup\u003e.\nHere's a sample vs\u003csup\u003e3\u003c/sup\u003e template:\n\n    \u003c!DOCTYPE html\u003e\n    \u003ctitle\u003e\n    $\u003e e \"$title\"\n    |\n    $\u003e e \"$site_name\"\n    \u003c/title\u003e\n    $\u003e echo \"$content\"\n\nThis template creates a simple HTML page with a `\u003ctitle\u003e` element\ncontaining the HTML-escaped page name and site title. In the body of\nthe resulting HTML, it places the non-escaped content of the page.\n\nPages are written in Markdown (with a few extra bits; see below), and\nmight look something like this:\n\n    $$$\n    title='My page title'\n    $$$\n    # Hello, world!\n\n    This is a **Markdown** page.\n\nThe block with `$$$` on either side is interpreted directly, as Bash code.\nThis allows you to set variables that affect the template. You can also\nuse the same syntax as in templates (`$\u003e code`) to inject the output of\ncommands into your page as Markdown.\n\n## How?\n\nvs\u003csup\u003e3\u003c/sup\u003e works by transforming templates and source files into Bash\nscripts, which it then runs to generate page content. This transformation\nis done automatically (ie. there is no \"build\" step), but the results\nare cached so that it is only performed when the source files are updated.\n\nvs\u003csup\u003e3\u003c/sup\u003e is not a CGI script, but it is designed to be easy to use\nfrom one. It outputs the rendered page to `stdout` and accepts command\nline arguments as normal. Because arbitrary bash code can be run in pages\nand templates, you could even use CGI environment variables from within\nthem to create a truly dynamic website with vs\u003csup\u003e3\u003c/sup\u003e.\n\n## Dependencies\n\nvs\u003csup\u003e3\u003c/sup\u003e does not have many dependencies. It should run with most\nversions of Bash (though see the security notes below), and its only other\ndependency is the [`markdown`][md] command. If you want to use a different\nMarkdown implementation with a different command name, modify the source\ncode (don't worry, it's a tiny program).\n\n[md]: https://daringfireball.net/projects/markdown/\n\n## Security notes\n\nThe HTML escaping provided by vs\u003csup\u003e3\u003c/sup\u003e is not perfect. It's not even\nclose to perfect. [HTML escaping is hard][escaping], and I've not tried\nto do it perfectly. Context is crucial, but here are some rules of thumb:\n\n- `e` should be fine for the content of HTML tags (except `\u003cscript\u003e` and\n  `\u003cstyle\u003e` tags which are special and you shouldn't be using\n  user-generated content in anyway).\n- Always use `attr` for setting attributes of HTML tags dynamically.\n  `attr` basically just uses `e` with double quotes, but you shouldn't\n  do that manually in case a security flaw comes up and I change `attr`\n  to patch it.\n- Beware of command injection. If you're doing a variable expansion into\n  a Bash command, quote it.\n- Context matters. If in doubt, consult the source code.\n\nAlso, vs\u003csup\u003e3\u003c/sup\u003e is written in Bash, for which there have been\nvulnerabilities in the past (ShellShock). Please ensure you are running an\nup-to-date version of Bash.\n\n[escaping]: https://wonko.com/post/html-escaping\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilversquirl%2Fvs3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilversquirl%2Fvs3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilversquirl%2Fvs3/lists"}