{"id":17053791,"url":"https://github.com/terrymooreii/sia","last_synced_at":"2025-03-23T05:44:04.234Z","repository":{"id":218290441,"uuid":"746064319","full_name":"TerryMooreII/sia","owner":"TerryMooreII","description":"Static site generator","archived":false,"fork":false,"pushed_at":"2024-01-21T17:26:00.000Z","size":139,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-28T12:35:11.654Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","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/TerryMooreII.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":"2024-01-21T00:20:51.000Z","updated_at":"2024-01-21T00:27:58.000Z","dependencies_parsed_at":"2024-11-30T08:54:06.128Z","dependency_job_id":null,"html_url":"https://github.com/TerryMooreII/sia","commit_stats":null,"previous_names":["terrymooreii/sia"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TerryMooreII%2Fsia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TerryMooreII%2Fsia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TerryMooreII%2Fsia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TerryMooreII%2Fsia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TerryMooreII","download_url":"https://codeload.github.com/TerryMooreII/sia/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245061384,"owners_count":20554563,"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-14T10:13:14.484Z","updated_at":"2025-03-23T05:44:04.213Z","avatar_url":"https://github.com/TerryMooreII.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sia blog\n\nSia is static site generator\n\n## Installation\n\n```\nnpm install --save-dev @terrymooreii/sia\n```\n\nAfter installation run the following command in a new node repo\n\n```\nsia init\n```\n\nThis will install the nunjucks template files, some base css and a shell `index.html`\n\nIt also add the `.siarc.js` config file to the root of your project.\n\nThe `.siarc.js` file contains two sections.  One for configuing your site information. The second is to configure the app's folders, numjucks template, and markdown configutation. \n\n\n## Adding pages and posts\n\nThe easist way to add a new page or a post to your site is to run the following command\n\n```\nsia new post new-post-name\n```\n\nThis will create a new folder in the `content` folder called `new-post-name` and add a shell `index.html`\n\nYou can do the same thing to create a new page\n\n```\nsia new post new-post-name\n```\n\nThe difference between pages and posts is that during the build process sia keeps tack of all posts and generate a post list page at the url `/blog`\n\nNew pages and post will have config area at the top that tell sia how to handle the page and post.  All properties expect the image is required. The image is used to generate the page's `og:image`.  If its not present we will use the `blogs_image`.\n\n```\n---\n\ntemplate: post\ntitle: Page title\ncreated_at: 2024-01-12 16:00:00-5:00\ndescription: Testing out some markdown\n---\n```\n\n- `template` is the nunjucks template located in `src/_partials`\n- `title` is the post title and used in the blog posts list page\n- `create_at` is the date of the post\n- `description` a short description of the post\n\nNot ready to publish a post?  Add `draft: true`\n\n## Build\n\nTo build the site run \n\n```\nsia build\n```\n\nThis will parse all markdown files and then numjucks. \nThe default output folder is `/public`\n\nThe build command will also copy all `assets`, `js` and `css` to the `/public` folder.  If a post or a page folder contain other files other than markdown then those files will also get moved to the `/public/\u003cfolder\u003e`.  This makes it easy to organize a single page or posts with custom js, css, or images.\n\nAll markdown files will get parsed with `markdown-it` and you can add additional `markdown-it` plugins in the `.siarc.js` file.\n\n## Plugins\n\nThere are lots of plugins that you can use in sia to extend [markdown-it](https://github.com/markdown-it/markdown-it) and in turn sia.  Just install the plugin, import itto your `.siarc.js` file and then add it to the `app.markdown.plugins` array.  \n\n## Local developement \n\nCurrently these are the apps that I use on my blog for local development and building\n\n```\n\"scripts\": {\n  \"serve\": \"npx http-server public\",\n  \"watch\": \"forever --watchDirectory ./src -w ./node_modules/@terrymooreii/sia/lib/index.js build\",\n  \"dev\": \"concurrently --kill-others \\\"npm run watch\\\" \\\"npm run serve\\\"\",\n  \"clean\": \"rm -rf public\",\n  \"build\": \"sia build\"\n},\n```\n\n```\nnpm install forever concurrently http-server\n```\n\nComing soon will be a simple way to run a local web server to see live updates to posts and pages as you work via the `sia` command.\n\n## Templates and site configuration\n\nAll `njk` files are in a simple default state to generate a simple and clean website.  You can modifiy the html in these file to customer your site to look how you want.\n\nIf you make something cool please let me know.\n\n\n## Todo\n\nThis is a list of items that still need to be tackled\n\n[ ] Better error handling\n[ ] Pagination\n[ ] `sia init` to generate a new site and clean up of the initial theme\n[ ] While pages and longer blog posts are great, i would like to add a mircoblogging feed to the site.\n[ ] Github action to publish new version to npm","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrymooreii%2Fsia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterrymooreii%2Fsia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrymooreii%2Fsia/lists"}