{"id":19686431,"url":"https://github.com/qualityshepherd/splog","last_synced_at":"2025-11-22T04:03:07.034Z","repository":{"id":151557260,"uuid":"311164452","full_name":"qualityshepherd/splog","owner":"qualityshepherd","description":"A simple, single page, blog written in functional, vanilla js that supports markdown, rss, podcasts and deploys to github pages (github.io). ","archived":false,"fork":false,"pushed_at":"2025-09-23T19:57:00.000Z","size":24903,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-23T21:31:29.077Z","etag":null,"topics":["ava","blog","e2e","functional-programming","github-pages","markdown","marked","pagination","puppeteer","rss","search","spa","testing","unit-test","vanilla-js"],"latest_commit_sha":null,"homepage":"http://splog.brine.dev/","language":"JavaScript","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/qualityshepherd.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-11-08T22:08:10.000Z","updated_at":"2025-09-23T19:57:04.000Z","dependencies_parsed_at":"2023-06-01T23:15:34.709Z","dependency_job_id":"4d60c67d-e022-4442-9105-77ed4d09e2f5","html_url":"https://github.com/qualityshepherd/splog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/qualityshepherd/splog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qualityshepherd%2Fsplog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qualityshepherd%2Fsplog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qualityshepherd%2Fsplog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qualityshepherd%2Fsplog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qualityshepherd","download_url":"https://codeload.github.com/qualityshepherd/splog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qualityshepherd%2Fsplog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285731799,"owners_count":27222214,"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-11-22T02:00:05.934Z","response_time":64,"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":["ava","blog","e2e","functional-programming","github-pages","markdown","marked","pagination","puppeteer","rss","search","spa","testing","unit-test","vanilla-js"],"created_at":"2024-11-11T18:28:19.920Z","updated_at":"2025-11-22T04:03:07.029Z","avatar_url":"https://github.com/qualityshepherd.png","language":"JavaScript","readme":"[![Deploy to Pages](https://github.com/qualityshepherd/splog/actions/workflows/deploy2pages.yml/badge.svg)](https://github.com/qualityshepherd/splog/actions/workflows/deploy2pages.yml)\n\n# SPLOG v2\n\nA simple, single-page blog written in functional, vanilla JS that supports Markdown, RSS, podcasts, and deploys to GitHub Pages.\n\n[DEMO](https://splog.brine.dev)\n\n## Features\n- Static site (no server needed)\n- Hash-based routing\n- Write posts in Markdown\n- Index generation + Markdown to HTML via [marked](https://github.com/markedjs/marked)\n- Functional, vanilla JavaScript (no frameworks)\n- RSS feeds for blog, podcast, and sitemap\n- Easy deployment to GitHub Pages\n\n## Install\n1. `git clone git@github.com:qualityshepherd/splog.git`\n1. `cd splog`\n1. `npm ci`           # install dependencies\n1. `npm run server`   # (optional) local dev server\n\n## Setup\n- edit `config.js` to customize your blog settings\n- add Markdown-formatted posts to the `/posts` folder\n- each post should include frontmatter (meta) like `title`, `date`, and `tags`\n- run the index generator to rebuild `index.json` from your posts\n- (optional) `npm run server` to preview your blog locally\n\n## Adding Pages\n1. add a new route to `ROUTES` in `handlers.js`\n1. modify `routeHandlers()` to handle your new route:\n1. add templates to `templates.js`\n1. link to the page in `index.html`\n\n## Testing\nTests use [AVA](https://github.com/avajs/ava) as a test runner for both unit and e2e tests. E2E tests use my own _clever-ish?_ bastardization of AVA and [Puppeteer](https://www.npmjs.com/package/puppeteer) that I call ([AvaPup](https://github.com/qualityshepherd/splog/blob/main/tests/e2e/avapup.js)). It works remarkably well, actually...\n\n- `npm test` to run all tests\n- `npm debug` to run e2e tests _headed_ and slow them down via SLOMO\n- passing tests are also a requirement to deploy to github pages\n\n```console\n✔ unit › ui › getLimitedPosts should return limited number of posts\n✔ unit › ui › getLimitedPosts should handle edge cases\n✔ unit › ui › postMatchesSearch should return posts with matching title\n✔ unit › ui › postMatchesSearch should return posts with matching markdown\n✔ unit › ui › postMatchesSearch should return posts with matching tag\n✔ unit › ui › postMatchesSearch should handle multiple search terms\n✔ unit › ui › postMatchesSearch should be case insensitive\n✔ unit › ui › postMatchesSearch should return true for empty search term\n✔ unit › ui › postMatchesSearch should handle posts with missing properties\n✔ unit › ui › renderTags should return formatted tags\n✔ unit › ui › renderTags should return empty string for non-array input\n✔ unit › ui › renderTags should handle custom hash parameter\n✔ unit › ui › renderTags should URL-encode tag names properly\n✔ unit › ui › renderTags should include proper accessibility attributes\n✔ unit › ui › renderTags should generate valid HTML structure\n✔ unit › ui › UI functions should be pure and not depend on global state\n✔ unit › state › sortByDate should sort posts descending by default\n✔ unit › state › sortByDate should sort posts ascending if desc is false\n✔ unit › state › sortByDate should not mutate input\n✔ unit › state › getState should return a copy of state\n✔ unit › state › setPosts should update posts and return new posts array\n✔ unit › state › setDisplayedPosts should update displayed post count\n✔ unit › state › setSearchTerm should update search term\n✔ unit › state › incrementDisplayedPosts should increase displayed posts count\n✔ unit › state › updateState should update multiple properties at once\n✔ unit › state › state updates should be immutable\n✔ unit › state › removeFuturePosts should filter out future posts\n✔ unit › state › resetState should restore initial state\n✔ unit › state › state getters should return copies to prevent mutation\n✔ unit › state › state should handle edge cases gracefully\n✔ unit › state › readSiteIndex should return parsed JSON\n✔ unit › state › readSiteIndex should exclude future-dated posts\n✔ e2e › e2e › should access archive posts via url (2.3s)\n✔ e2e › e2e › should display all posts (2.3s)\n✔ e2e › e2e › should be responsive; handle different viewports (2.3s)\n✔ e2e › e2e › should filter posts by tag (2.3s)\n✔ e2e › e2e › should load more posts (2.3s)\n✔ e2e › e2e › should display a single post (2.3s)\n✔ e2e › e2e › should use menu to navigate to about page (2.3s)\n✔ e2e › e2e › should search for post (2.4s)\n✔ e2e › e2e › should display not-found message when no search results found (2.7s)\n\n41 tests passed\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqualityshepherd%2Fsplog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqualityshepherd%2Fsplog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqualityshepherd%2Fsplog/lists"}