I am currently exploring Octopress. One question popped up during the course of my work - is there an easy way to publish a post from a random computer/device. I mean - if I do this via rake new_post['title'] I must have the whole thing set up on the machine I am doing it from - Ruby, gems etc.. Is there an easier way - like create a markdown document and than just send it to the Github repository?
I think there is no way to do that.
Since octopress is based on Jekyll, every page is rendered as follows:
Render Liquid
Convert if a converter exists for that extname(e.g. .markdown)
Render layout(s) recursively.
That is to say, for such a static website, it's unable to show a markdown document directly.
On the other hand, if what we send to repo is not a markdown file which must be converted to html to be showed, but a html directly, it's also not possible to make the site work normally.
Since not only the post page itself should be generated, but also many related parts such as index page, categories and so on.
In one word, octopress is static, we need generation before deployment.
Reference:Allow markdown to not be compiled to html
Related
I have a simple use case on a site that I am publishing with Jekyll:
I need to list values of a certain type. Let's say one type has URIs of the form .../base/typex/value. I am generating a file .../typex/value.md and Jekyll happily serves it.
I also want to serve pages listing all values. That page should be named .../base/typex or .../base/typex/ (I don't mind either way).
I cannot use the file .../base/typex/index.md to do this because in some cases, index is actually a valid value.
I am creating .../base/typex.md, but Jekyll ignores it, regardless of the permalink that I put in there that specifically has no trailing slash. Instead of serving the file, Jekyll serves the directory listing.
Is there any way I can solve this puzzle? If Jekyll had support for serving .../base/typex.md, everything would be good, but it seems as if as soon as there is a directory .../base/typex/, Jekyll simply ignores this file. Is there any workaround or configuration I can use? (And this is going to get hosted on GitHub, so I have no control over the Web server configuration.)
( https://github.com/dret/webconcepts/issues/25 has the backstory, in case anybody is interested. But the issue is fully described here, so there is no need to follow that link. )
I just tried to reproduce it with your provided repository, thanks for that!
If you create a file http-method.md in /concepts and set the permalink to
permalink: /concepts/http-method/, my local jekyll serves the page both in /concepts/http-method and /concepts/http-method/
I would like to create a Rails 4 app, where some data is entered into the db via a form and when it is published, any changes on the site are compiled and the entire consumer facing site is just a bunch of flat HTML files.
That way, on each request there isn't a db request done and just a simple HTML file is sent.
This is similar to the way Octopress operates, where you write a blog post locally and when you do a deploy it basically compiles the entire site into a large set of connected HTML files that are then pushed to your host(gh-pages for instance).
Is there a way to use extensive caching or something similar to get the same effect in Rails 4 or should I go about it another way in Rails or should I just try to customize Octopress for my needs?
Have a look at page caching, it has been moved from Rails to a separate gem
https://github.com/rails/actionpack-page_caching
It saves the generated HTML files to a specified directory which you should be able to deploy separately from the rest of the application.
I am currently developing a customized template of SquareSpace and I am not sure how to view the changes i have done locally? Also are there any resources out there to help me alter the templates, the documentation on the site isnt great?
Being able to develop and then display rendered squarespace (SS) templates in a local development environment (or "offline") seems to be an oft requested feature.
It's not straightforward so far as I can tell. To quote
The short answer is no. There is not currently a way to develop locally.
However, once we get site data exports working it should be a simple matter to setup a lightweight node js script to get local development running.
(source), similar answers
According to the SS docs, the templating engine is JSON Template, the styling is done by LESS and all of the data for a website is stored as JSON. The data for any page of an SS website can be viewed by appending ?format=json-pretty to the URL of the page (or &format=json-pretty if the URL already has a query string appended to it).
Here's an example of how to use the javascript version of JSON Template to render a template (view its source).
So it should be possible to set-up a local devenv. The solution would have to combine the use of the aforementioned components along with a way to combine a set of templates for any given page (e.g. combine sites.region and collections/blog.list for a blog index page). You could probably even hack together an html page along the lines of the aforementioned JSON Template example without the ability to combine templates if you just wanted to develop within a single template.
Recently started using Grunt as a build tool for a web app I'm hobbyist developing. I have a series of HTML files (to be used as templates), in a single folder, that I'd like injected at a particular point in the main HTML file.
Ideally, I could also wrap each file in a tag, but having to manually include this in the template files themselves is acceptable.
Is there an existing Grunt module to perform this?
EDIT: I may have worded my problem poorly before. Essentially, I have a single HTML file where the app will run (Single page app, business simulation game). In a separate folder, I have a series of HTML templates. Each of these template represents a dialog, or custom info page, something of that nature. As the app is developed, more and more templates will be in this folder.
Rather than manually including each one in my page, I'd like a way to automate injecting them that I can manage through Grunt.
I may be late to answer this question, but for anyone that end up here, I found this grunt-plugins, maybe they help you too:
grunt-replace.
grunt-html-build.
grunt-processhtml.
I have two jekyll web sites, and I want to syndicate some of the content (one of the categories) from the source blog to the receiving blog via syndication.
I can see how RSS feeds are automatically created with jekyll, but how does one consume them on another site - so that it looks like those posts are from that second site?
Can I do this in jekyll?
The biggest problem is that you jekyll is a static website generator. So you can't do this automatically inside of Jekyll. However, there are two options:
You would need to setup a cron script of some sort that pulls down the RSS feed, creates the jekyll files, runs the jekyll command and uploads it to the web. This can all be automated.
You could use javascript to display this all. This would basically be writing your own java script (or modifying one you found on the internet). You could use something like this: http://code.google.com/p/jsrss/