{"id":17920952,"url":"https://github.com/davidanson/simple-website-with-blog","last_synced_at":"2025-03-24T00:32:38.720Z","repository":{"id":41549574,"uuid":"137702929","full_name":"DavidAnson/simple-website-with-blog","owner":"DavidAnson","description":"A simple website with a blog","archived":false,"fork":false,"pushed_at":"2024-04-30T15:57:39.000Z","size":4576,"stargazers_count":12,"open_issues_count":0,"forks_count":40,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-01T22:25:40.614Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/DavidAnson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"DavidAnson"}},"created_at":"2018-06-18T02:30:20.000Z","updated_at":"2024-05-06T12:49:06.205Z","dependencies_parsed_at":"2023-12-07T06:28:26.945Z","dependency_job_id":"870e8973-f0ba-46fc-9e86-32a9d2801d8a","html_url":"https://github.com/DavidAnson/simple-website-with-blog","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/DavidAnson%2Fsimple-website-with-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidAnson%2Fsimple-website-with-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidAnson%2Fsimple-website-with-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidAnson%2Fsimple-website-with-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavidAnson","download_url":"https://codeload.github.com/DavidAnson/simple-website-with-blog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245191477,"owners_count":20575246,"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":[],"created_at":"2024-10-28T20:29:47.171Z","updated_at":"2025-03-24T00:32:38.385Z","avatar_url":"https://github.com/DavidAnson.png","language":"JavaScript","funding_links":["https://github.com/sponsors/DavidAnson"],"categories":[],"sub_categories":[],"readme":"# simple-website-with-blog\n\n\u003e A simple website with a blog\n\n`simple-website-with-blog` is a simple [Node.js](https://nodejs.org/) web application for static content that includes a blog.\nIt was created as the basis for [my own website](https://dlaa.me/), but everyone is welcome to use it.\nThe implementation strives to be simple and free of unnecessary dependencies.\n\n## Goals\n\n- An easy way to create a simple, secure website with a blog\n- Support for text-based and photo-based blog formats\n- Easy authoring in HTML, Markdown (with code formatting), or JSON\n- Ordering of posts by publish date or content date\n- Easy customization of site layout and formatting\n- High resolution (2x) support for photo blog images\n- Support for Windows and Linux hosting with Node.js\n- Simple post format that separates content and metadata\n- Ability to author hidden posts and schedule a publish date\n- Ability to create posts that never show up in the timeline\n- Support for archive links and tagging of posts by category\n- Quick search of post content, including simple search queries\n- Automatic Twitter and Open Graph metadata for social media\n- Automatic cross-linking of related posts\n- No JavaScript requirement for client browsers\n\n## Structure\n\n- `/app.js` Entry point for the application, configures the server and static content\n- `/blog.js` Implementation of the blog, archives, tags, search, and RSS\n- `/config.js` Environment variables used to control basic behavior\n- `/sites/shared.js(x)` Blog layout code shared by the sample sites\n- `/sites/sample-text/render.js(x)` Blog layout code for the sample text blog\n- `/sites/sample-text/static/...` Static files and directories for the sample text blog\n- `/sites/sample-text/posts/...` Post metadata and content for the sample text blog\n- `/sites/sample-photo/...` Sample photo blog\n- `/sites/test/...` Test site for running unit tests\n\n## Instructions\n\n1. Install Node.js\n1. Fork and clone repository\n1. Create directory under `/sites` or use one of the samples\n1. Add static content to `/sites/yoursite/static`\n1. Add post JSON and content under `/sites/yoursite/posts`\n1. `npm install`\n1. `npm run compile`\n1. `npm start`\n1. Open \u003chttp://localhost:3000/\u003e and verify\n1. Commit changes to repository\n1. Deploy repository to hosting service\n\n## Configuration\n\n- `SWWB_SITE_ROOT` Set to specify the site to use when serving content (ex: `./sites/sample-text`)\n- `SWWB_REDIRECT_TO_HTTPS` Set to `true` to redirect HTTP traffic to HTTPS and set an HSTS header\n- `SWWB_SHOW_FUTURE_POSTS` Set to `true` to show posts with a publish date in the future (good when authoring locally)\n- `SWWB_HOSTNAME_TOKEN` Set to change the replacement token for inserting host name in posts (RSS uses absolute URLs)\n- `SWWB_ACME_CHALLENGE` Set to specify the ACME challenge for [Let's Encrypt](https://letsencrypt.org/) (ex: `abc.123,def.456`)\n\n## Dependencies\n\n| Project      | Home Page                                    |\n|--------------|----------------------------------------------|\n| Express      | \u003chttps://expressjs.com/\u003e                     |\n| React        | \u003chttps://reactjs.org/\u003e                       |\n| Helmet       | \u003chttps://helmetjs.github.io/\u003e                |\n| markdown-it  | \u003chttps://github.com/markdown-it/markdown-it\u003e |\n| highlight.js | \u003chttps://highlightjs.org/\u003e                   |\n| Lunr         | \u003chttps://lunrjs.com/\u003e                        |\n| rss          | \u003chttps://github.com/dylang/node-rss\u003e         |\n\n## Contributing\n\n- Open issue, discuss proposal\n- Fork and clone repository\n- Change code and update tests\n- `npm test`\n- `npm run lint`\n- Review changes\n- Send pull request\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidanson%2Fsimple-website-with-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidanson%2Fsimple-website-with-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidanson%2Fsimple-website-with-blog/lists"}