{"id":16025165,"url":"https://github.com/bohrium272/ssg-rb","last_synced_at":"2025-06-29T17:37:47.873Z","repository":{"id":39580273,"uuid":"430440135","full_name":"bohrium272/ssg-rb","owner":"bohrium272","description":"Yet another static site generator, built to get along well with classless CSS!","archived":false,"fork":false,"pushed_at":"2022-05-31T20:18:57.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T04:20:52.739Z","etag":null,"topics":["ruby","static-site-generator"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/bohrium272.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}},"created_at":"2021-11-21T17:55:18.000Z","updated_at":"2021-11-26T14:45:25.000Z","dependencies_parsed_at":"2022-09-04T09:42:12.357Z","dependency_job_id":null,"html_url":"https://github.com/bohrium272/ssg-rb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bohrium272/ssg-rb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bohrium272%2Fssg-rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bohrium272%2Fssg-rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bohrium272%2Fssg-rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bohrium272%2Fssg-rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bohrium272","download_url":"https://codeload.github.com/bohrium272/ssg-rb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bohrium272%2Fssg-rb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262639203,"owners_count":23341440,"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":["ruby","static-site-generator"],"created_at":"2024-10-08T19:41:37.097Z","updated_at":"2025-06-29T17:37:47.852Z","avatar_url":"https://github.com/bohrium272.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"ssg-rb\n---\n\nYet another static site generator, built to get along well with classless CSS!\n\n[Demo Site with Pico.css as theme!](https://bohrium272.github.io/ssg-rb)\n\n### About\n\n* Yes this is yet another static site generator! \n* Actually, its more of a Ruby script that can compile markdown files placed as per a specific (and opiniated) hierarchy. \n* While the layout is pre-defined, the appearance can be changed by dropping in a [classless stylesheet](https://github.com/dbohdan/classless-css). \n\n### Content\n\n#### Directory Structure\n\n1. The `content/` directory should contain one directory for each post\n2. A post directory `content/xyz-abc/` should contain a markdown file and any static content like images etc.\n\n```\ncontent/\n   |\n   --xyz-abc/\n\t\t|\n\t\t--xyz-abc.md\n\t\t--image.png\n\t\t--image.jpg\n```\n\n#### Frontmatter, Category and Tags\n\n* Each markdown content file can contain a front-matter, a TOML snippet containing some metadata.\n\n\t```toml\n\ttitle = \"\"\n\tdate = \"YYYY-MM-DD\"\n\tdescription = \"\"\n\ttags = [\"\u003ctag1\u003e\", \"\u003ctag2\u003e\", \"\u003ctag3\u003e\"]\n\tcategory = \"notes\"\n\t```\n\n* Each page can be associated with a category:\n\t\t* Categories are displayed as nav elements on each content page\n\t\t* An index page for each category is generated at `/categories/\u003ccategory\u003e/`\n\n* Each page can have a set of tags:\n\t\t* Tags are displayed on the bottom of each page\n\t\t* An index page for each tag is generated at `/tags/\u003ctag\u003e/`\n\n### Usage\n\n1. Place the ruby script `ssg.rb` in the root of your project.\n2. Use `bundle` to install dependencies\n    ```bash\n\t$ gem install bundler\n\t$ bundle install\n\t```\n3. Place your classless CSS\tas `static/theme.css`. If any overrides are needed, they can be placed in `static/custom.css`.  \n4. Run `ssg.rb` and the site will be available in the `public` directory.\n5. Serve the public directory using a simple HTTP server like the Python `http.server` module\n    ```bash\n\t$ cd public/\n\t$ python3 -m http.server\n\t```\n\t\n### Why?\n\nOver time I used a number of static site generators like Hugo, Zola, Hexo, Jekyll etc. While each of these require structured representations of content, often when I wanted to change the look of a site I couldn't do it by simply changing the theme attribute in the site configuration. This implied that each theme required content to be structured or written differently. At least this was the case with the themes I tried to use...\n\nSo this is an attempt to create a script that expects a fixed (and opinionated) content structure, builds it into a simple (and opinionated) site, while allowing the use of [classless stylesheets](https://github.com/dbohdan/classless-css) for theming.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbohrium272%2Fssg-rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbohrium272%2Fssg-rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbohrium272%2Fssg-rb/lists"}