{"id":14068051,"url":"https://github.com/DASpringate/samatha","last_synced_at":"2025-07-30T02:32:49.973Z","repository":{"id":142322867,"uuid":"9655350","full_name":"DASpringate/samatha","owner":"DASpringate","description":"Build static websites in R","archived":false,"fork":false,"pushed_at":"2013-12-20T12:09:14.000Z","size":853,"stargazers_count":43,"open_issues_count":3,"forks_count":4,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-12-04T08:37:02.775Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"R","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/DASpringate.png","metadata":{"files":{"readme":"README.Rmd","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":"2013-04-24T18:55:51.000Z","updated_at":"2021-11-17T02:39:35.000Z","dependencies_parsed_at":"2023-03-13T07:45:37.815Z","dependency_job_id":null,"html_url":"https://github.com/DASpringate/samatha","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DASpringate/samatha","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DASpringate%2Fsamatha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DASpringate%2Fsamatha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DASpringate%2Fsamatha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DASpringate%2Fsamatha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DASpringate","download_url":"https://codeload.github.com/DASpringate/samatha/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DASpringate%2Fsamatha/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267798625,"owners_count":24145727,"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-07-30T02:00:09.044Z","response_time":70,"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":[],"created_at":"2024-08-13T07:05:54.993Z","updated_at":"2025-07-30T02:32:49.640Z","avatar_url":"https://github.com/DASpringate.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"Samatha v0.4.0\n============\n\n#### Copyright David Springate 2013 ([CC BY 3.0](creativecommons.org/licenses/by/3.0))\n##### @datajujitsu\n\n\nSamatha is an R package for quickly building _Github-ready_ static sites in R. It contains a simple, functional-style DSL for rendering HTML, an engine for compilation of static websites as you build them and a development web-server for viewing your sites of line before you deploy. \n\n*This project is still in active development. Feel free to contact me with any issues/bugs/suggestions*\n\nThe Static site engine uses the Samatha DSL to build layout templates which it then combines with content to generate individual pages. templates are written as a nested R expression, with no need for extenal templating systems.\nThere are two ways to build pages:\n\n1. Pages are written entirely in the Samatha DSL and compiled with a layout file. This is ideal for introductiory pages and index pages.\n2. Blog posts are written in .Rmd format, which is then converted to md using [knitr](http://yihui.name/knitr/) and then to html using [markdown](http://cran.r-project.org/web/packages/markdown/index.html). Posts are then rendered within the layout for that post. \n\nThe Samatha engine `samatha()` now functions as expected. It compiles your site and then updates in real time according to the following rules:\n\n* if a layout file is altered\n    - The whole site is re-built\n        - pages compiled to html\n        - posts knitted and then compiled to html\n        - rss and tag files generated\n* if any page/post source files are newer than their corresponding html or if the html doesn't exist:\n    - Pages in question are knitted and/or re-compiled\n    - rss and tag files re-generated\n* Any html files without a corresponding source are deleted\n\nExtra features:\n\n* simple wrapper functions for including snippet files containing md or html/js (e.g. for external comments site code and analytics)\n* You can include tags for posts in the first line of a post .Rmd file by starting the line with `%`. All words on the rest of the line are coerced to tags and included in the RSS file.\n* Automatically generates an RSS file at the top level of your site with global paths and per item tags, content and full links to images etc. Tags/categroies for the whole site can be set in the template/config/config.R file.  This is the format required by [Rbloggers](www.rbloggers.com) for blog submission.\n* The `rss.category.feeds` variable in the `config.R` file can be used to add extra rss feeds for specific categories.  For example, [R Bloggers](www.rbloggers.com) require that all posts sent to them only concern `R`.  You can therefore set `rss.category.feeds = c(R)` and Samatha will produce another rss feed just with your R content (matching tags for \"R\") and put it in `site/site/tags/R.xml`.  You can then send this link to Rbloggers and be feee to publish on other subjects, knowing only R content will go to Rbloggers.\n* Helper functions for building lists of tags and lists of posts\n\nSites are created with the following structure:\n\n* __basename__\n    - __template__ the source for your site\n        - __layouts__ layout templates for pages and posts\n        - __config__ contains config.R file for rss, tags, post layoutss and figure path\n        - __pages__ Content of pages built with the Samatha dsl\n        - __posts__ Rmd files of blog posts\n        - __resources__ html/js/md snippets\n    - __basename__ the compiled site.  Copy the contents to a git repo to have a functioning site\n        - __css__ Put your css files (e.g. from twitter bootstrap) here\n        - __img__ plots from knitted Rmd are automatically placed here\n        - __pages__ html for site pages\n        - __posts__\n        - __tags__\n\n## Examples\n\nMy [personal blog](http://daspringate.github.io) was built using Samatha, [twitter bootstrap](http://twitter.github.io/bootstrap/) and [Github pages](http://pages.github.com/). I used the [Readable](http://bootswatch.com/readable/) theme. See [here](https://github.com/DASpringate/blog) for the file structure of a Samatha site.\n\nThis [gist](https://gist.github.com/DASpringate/6464300) Gives code to quickly setting up an example site.\n\n## Install\n\nYou should be able to install the current version of Samatha with devtools:\n\n```{r, eval=FALSE}\n# check install_github()\nrequire(devtools)\ninstall_github(\"samatha\", \"DASpringate\")\n```\n\n## Simple Startup\n\n```{r, eval=FALSE}\nlibrary(samatha)\nsite \u003c- \"/dir1/dir2/dirSite\"\nskeleton(site)\nsetup_example_site(site)\n\nsamatha(site, rss=FALSE, initial=TRUE)\nsamatha(site, rss=FALSE, initial=TRUE)\n\nrun.server(site) # open browser to localhost:8000 to see the site\n```\n\n\n## Documentation\n\n_I'm still working on it!_\n\n* [Wiki](https://github.com/DASpringate/samatha/wiki/_pages)\n* [API docs](http://daspringate.github.io/samatha/man/index.html) These have been auto-generated from the .Rd documentation using Samatha\n* [Quick-start gist](https://gist.github.com/DASpringate/6464300)\n\n## Glaring ommisions (To be fixed very soon):\n\n* Automatic creation of config files and example default templates.  For now, check my [site structure](https://github.com/DASpringate/blog) for setup details.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDASpringate%2Fsamatha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDASpringate%2Fsamatha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDASpringate%2Fsamatha/lists"}