Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

knitpress #205

Closed
yihui opened this issue Apr 17, 2012 · 18 comments
Closed

knitpress #205

yihui opened this issue Apr 17, 2012 · 18 comments
Labels
feature Feature requests
Milestone

Comments

@yihui
Copy link
Owner

yihui commented Apr 17, 2012

there are wordpress, octpress, ... and we can probably come up with a knitpress for R bloggers based on Jekyll -- it will only be a simple template providing wrappers to knit blog posts; not really a comprehensive blogging engine

we should also consider #93 and think about integrating github wiki with knitr

also see https://www.gitbook.io/

@yihui
Copy link
Owner Author

yihui commented Jul 4, 2012

this is pretty much how it looks like: http://jfisher-usgs.github.com/r/2012/07/03/knitr-jekyll/

@yanping
Copy link

yanping commented Nov 8, 2012

In the 5th ChinaR conference (shanghai), I gave a demo how to use knitr and jekyll to post articles automatic. But the demo is very dirty. Maybe in the future, knitpress will come ture.

@yihui
Copy link
Owner Author

yihui commented Nov 8, 2012

I'm working on it these days. Hopefully it will come soon.

@ramnathv
Copy link
Contributor

ramnathv commented Nov 8, 2012

I have a working prototype for generating web pages using only R. See http://www.slidify.org. It was generated from R Markdown files and mustache templates. You can generate the HTML pages using make pages and push it to github using make deploy. You can switch the appearance of the page to any Bootswatch theme by modifying the config file, setting cdn: TRUE and theme: <what you want>

I am working on converting it into a full-fledged blogging package, by adding the necessary glue to manage posts. Compilation will use make so that incremental page generation can be done (Jekyll sucks at this). The objective is to make Octopress themes and Jekyll themes as supported frameworks, which means a user can flip the appearance of the blog by just changing a single parameter in the config file.

@dwoll
Copy link

dwoll commented Nov 21, 2012

The "knitpress" idea is great, thank you all for pursuing this line of work! Like yanping, I stitched together R markdown and Jekyll (to create an R demo website, see this example), and the workflow is not really smooth:

Jekyll expects to have a YAML front matter, and I do not know how this meta-data could be embedded in an Rmd document, such that it survives knitr and is formatted correctly for Jekyll in the resulting md file. So I have to run a script to add those front matters in post-processing. Jekyll also expects a certain file name pattern that may fit blog posts, but not more complex structured sites. So the script also has to change file names. Jekyll's liquid template engine uses {{ and }} as delimeters. Unfortunately, that could be valid R output, e.g., from a function from package sets. So the script has to filter these and replace them with { { and } }.

However, liquid is nice because it allows to represent a more complex site structure than a blog with categories and sub-categories. One can build side-bar navigation and breadcrumbs. ramnathv's slidify looks really impressive, but I am not sure if it supports such a hierarchical site structure.

@ramnathv
Copy link
Contributor

@dwoll. That set of pages look awesome both the content and the design. It's a great template to design tutorial sites!

I am extending Slidify to support blogs and web pages. The slidify web page http://www.slidify.org has been built using slidify. I have worked out page generation (as it is identical to what slidify does, just different templates). The time consuming part is figuring out the metadata in the payload so that tag lists and category lists can be generated. Moreover, I am using mustache as the templating language since I find it more elegant and can be handled entirely within R (the whisker package), which requires modifying the payload data structures so that they can be rendered correctly. I have managed to replicate @yihui s vistat blog using just R. I will post the working prototype package to http://github.com/ramnathv/poirot in a week or two so that people can fork away and contribute.

@yihui
Copy link
Owner Author

yihui commented Nov 22, 2012

@ramnathv that sounds awesome; I'm looking forward to it.

@ramnathv
Copy link
Contributor

@yihui @dwoll @yanping I give you poirot, a blog aware, static website generator for reproducible content. Here is a sample blog generated using poirot. You will see from the blog posts that it integrates well with slidify allowing users to generate a page as a slide deck. It is still version 0.0.1 and lacks several features, but I wanted to give you guys the heads up.

Poirot

@pchalasani
Copy link

I am trying to set up an emacs-based environment where I can write my original source in org-mode, and from there be able to generate a blog or page containing math, code snippets and R plots. Ideally I'd like to generate a page that looks like this: http://blog.aggregateknowledge.com/ or this: http://blog.echen.me/2012/03/20/infinite-mixture-models-with-nonparametric-bayes-and-the-dirichlet-process/ I am trying to use knitr and MathJax and jekyll/octopress... I have it more or less working but there are a few wrinkles with markdown trying to interpret math inside $...$ and not leaving it alone for MathJax to process. I had not heard of slidify or poirot before, so I'll check them out. My current system is based on tweaks of http://www.tomtorsneyweir.com/research-notebook

@ramnathv
Copy link
Contributor

@pchalasani Poirot is still an experiment. You can see a sample blog up and running at http://ramnathv.github.com/poirotBlog/. Octopress themes are notoriously complicated to adapt, but any of the Jekyll themes can be adapted easily. Right now I have adapted two other themes for Poirot (Dinky and Left). If you are interested in testing Poirot out, send me a message, as the documentation is still thin.

@yihui
Copy link
Owner Author

yihui commented Jan 17, 2013

@pchalasani to preserve $ $, you need to use the markdown engine kramdown for Jekyll; that is the only engine that I know supports $ $.

@pchalasani
Copy link

@ramnathv can poirot do math nicely as in those 2 blog posts I linked to?

@yihui kramdown needs $$..$$ for both inline and displayed math -- not what I want. I'd rather use $..$ for inline and $$..$$ for displayed math, so that my original .org file can easily be used to produce a pdf as well as the html page.

@pchalasani
Copy link

@ramnath those themes Dinky and Left look really nice, and I like the Brownian motion page -- and it does look like it supports latex-math as well.

@ramnathv
Copy link
Contributor

@pchalasani Poirot uses the markdown package by RStudio, and hence supports all features supported by it, including latex math. It is still rough around the corners and at the moment, lacks several features (like RSS feeds, permalinks etc). But Poirot is the ONLY static blog generator I know of which can do HTML5 slides in posts (check out the second post in http://ramnathv.github.com/poirotBlog/) :-)

@yihui
Copy link
Owner Author

yihui commented Jan 17, 2013

@yihui yihui removed this from the v1.6 milestone May 25, 2014
@piccolbo
Copy link

Just a data point, I blog using octopress + knitr, but I just use a template with an include in octo and then link to the output in an RStudio project with output set to html_fragment. It's a little manual but not much at all. The only thing I don't like is that images are embedded in the html which makes hard to link to them, but that way it's one include and it's done.

@yihui yihui added this to the v1.7 milestone Sep 30, 2014
@yihui
Copy link
Owner Author

yihui commented Sep 30, 2014

I closed this issue since I'm no longer interested in a separate knitpress package. Instead, I spent a couple of days working on serving Jekyll websites with R. For those who are interested, you may check out https://github.com/yihui/knitr-jekyll It is still experimental but should work reasonably well.

@github-actions
Copy link

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Feature requests
Projects
None yet
Development

No branches or pull requests

6 participants