Are there any tools out there for adding search to a site which only consists of static files? I'm using nanoc (http://nanoc.stoneship.org/) to generate prose-like documentation (as opposed to more structured API documentation) for some projects which exist behind a firewall, so Google can't be used. Solr is possible, but I'd prefer not to use it. I'd like for the documentation to be completely self-contained.
One possibility would be create a static search index when the rest of the site is generated, and to use javascript to search against that index. It looks like this project would allow that: http://jssindex.sourceforge.net/ . However, it's pretty old and that makes me hesitant to try it out.
One possibility (of many) is to convert your app to a Rack app. Have Rack simply serve up the files that were generated from nanoc. But also, Rack can react to a POST request generated from a search form. From there, you are in dynamic-web-app Ruby-land, where anything is possible! :) If the collection of web pages isn't too big (or you are not expecting tons of traffic), you could even write your own search code in Ruby that simply looks in all of the HTML files and builds an HTML response of the search results.
On Aug 6, 2012, at 2:29 PM, Daniel Higginbotham wrote:
> Are there any tools out there for adding search to a site which only consists of static files? I'm using nanoc (http://nanoc.stoneship.org/) to generate prose-like documentation (as opposed to more structured API documentation) for some projects which exist behind a firewall, so Google can't be used. Solr is possible, but I'd prefer not to use it. I'd like for the documentation to be completely self-contained.
> One possibility would be create a static search index when the rest of the site is generated, and to use javascript to search against that index. It looks like this project would allow that: http://jssindex.sourceforge.net/ . However, it's pretty old and that makes me hesitant to try it out.
> If anyone has any leads, I'd appreciate it :)
> Daniel
> -- > You received this message because you are subscribed to the Boston Ruby Group mailing list
> To post to this group, send email to boston-rubygroup@googlegroups.com
> To unsubscribe from this group, send email to boston-rubygroup-unsubscribe@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/boston-rubygroup
You may want to check out how sdoc generates the Rails API documentation. They seem to follow the same static searchable site generation strategy as jssindex but modernized:
On Monday, August 6, 2012 2:29:50 PM UTC-4, Daniel Higginbotham wrote:
> Are there any tools out there for adding search to a site which only > consists of static files? I'm using nanoc (http://nanoc.stoneship.org/) to > generate prose-like documentation (as opposed to more structured API > documentation) for some projects which exist behind a firewall, so Google > can't be used. Solr is possible, but I'd prefer not to use it. I'd like for > the documentation to be completely self-contained.
> One possibility would be create a static search index when the rest of the > site is generated, and to use javascript to search against that index. It > looks like this project would allow that: http://jssindex.sourceforge.net/ . > However, it's pretty old and that makes me hesitant to try it out.
> You may want to check out how sdoc generates the Rails API documentation. They seem to follow the same static searchable site generation strategy as jssindex but modernized:
> On Monday, August 6, 2012 2:29:50 PM UTC-4, Daniel Higginbotham wrote:
> Are there any tools out there for adding search to a site which only consists of static files? I'm using nanoc (http://nanoc.stoneship.org/) to generate prose-like documentation (as opposed to more structured API documentation) for some projects which exist behind a firewall, so Google can't be used. Solr is possible, but I'd prefer not to use it. I'd like for the documentation to be completely self-contained.
> One possibility would be create a static search index when the rest of the site is generated, and to use javascript to search against that index. It looks like this project would allow that: http://jssindex.sourceforge.net/ . However, it's pretty old and that makes me hesitant to try it out.
> If anyone has any leads, I'd appreciate it :)
> Daniel
> -- > You received this message because you are subscribed to the Boston Ruby Group mailing list
> To post to this group, send email to boston-rubygroup@googlegroups.com
> To unsubscribe from this group, send email to boston-rubygroup-unsubscribe@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/boston-rubygroup
On Mon, Aug 6, 2012 at 2:29 PM, Daniel Higginbotham <
dan...@flyingmachinestudios.com> wrote:
> Are there any tools out there for adding search to a site which only
> consists of static files? I'm using nanoc (http://nanoc.stoneship.org/) to
> generate prose-like documentation (as opposed to more structured API
> documentation) for some projects which exist behind a firewall, so Google
> can't be used. Solr is possible, but I'd prefer not to use it. I'd like for
> the documentation to be completely self-contained.
> One possibility would be create a static search index when the rest of the
> site is generated, and to use javascript to search against that index. It
> looks like this project would allow that: http://jssindex.sourceforge.net/ .
> However, it's pretty old and that makes me hesitant to try it out.
A better approach might be to use Tipue Search (http://www.tipue.com/search/).
It requires generating a .js file with the data to support searching.
With nanoc, this would be extremely easy to implement by generating this
.js file in the Rules file preprocess do ... end block in a similar manner
to the way a sitemap.xml file is generated.
In either case, performing the normal "nanoc compile" to build the site
will also generate the index used for the search and it should not really
add much to the compile time unless the site is large or unless you opt to
parse all the content to generate the index.
As I also maintain a nanoc site, I'd be interested to know what solution
you end up using.
> On Mon, Aug 6, 2012 at 2:29 PM, Daniel Higginbotham <dan...@flyingmachinestudios.com> wrote:
> Are there any tools out there for adding search to a site which only consists of static files? I'm using nanoc (http://nanoc.stoneship.org/) to generate prose-like documentation (as opposed to more structured API documentation) for some projects which exist behind a firewall, so Google can't be used. Solr is possible, but I'd prefer not to use it. I'd like for the documentation to be completely self-contained.
> One possibility would be create a static search index when the rest of the site is generated, and to use javascript to search against that index. It looks like this project would allow that: http://jssindex.sourceforge.net/ . However, it's pretty old and that makes me hesitant to try it out.
> A better approach might be to use Tipue Search (http://www.tipue.com/search/). It requires generating a .js file with the data to support searching. With nanoc, this would be extremely easy to implement by generating this .js file in the Rules file preprocess do ... end block in a similar manner to the way a sitemap.xml file is generated.
> In either case, performing the normal "nanoc compile" to build the site will also generate the index used for the search and it should not really add much to the compile time unless the site is large or unless you opt to parse all the content to generate the index.
> As I also maintain a nanoc site, I'd be interested to know what solution you end up using.
> Hope this helps,
> -Bill
> If anyone has any leads, I'd appreciate it :)
> Daniel
> -- > You received this message because you are subscribed to the Boston Ruby Group mailing list
> To post to this group, send email to boston-rubygroup@googlegroups.com
> To unsubscribe from this group, send email to boston-rubygroup-unsubscribe@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/boston-rubygroup
In this case I'm not sure how valuable it is as there are only three pages. But I do think it will be helpful for some of my other projects where there are multiple pages.
> On Mon, Aug 6, 2012 at 2:29 PM, Daniel Higginbotham <dan...@flyingmachinestudios.com> wrote:
> Are there any tools out there for adding search to a site which only consists of static files? I'm using nanoc (http://nanoc.stoneship.org/) to generate prose-like documentation (as opposed to more structured API documentation) for some projects which exist behind a firewall, so Google can't be used. Solr is possible, but I'd prefer not to use it. I'd like for the documentation to be completely self-contained.
> One possibility would be create a static search index when the rest of the site is generated, and to use javascript to search against that index. It looks like this project would allow that: http://jssindex.sourceforge.net/ . However, it's pretty old and that makes me hesitant to try it out.
> A better approach might be to use Tipue Search (http://www.tipue.com/search/). It requires generating a .js file with the data to support searching. With nanoc, this would be extremely easy to implement by generating this .js file in the Rules file preprocess do ... end block in a similar manner to the way a sitemap.xml file is generated.
> In either case, performing the normal "nanoc compile" to build the site will also generate the index used for the search and it should not really add much to the compile time unless the site is large or unless you opt to parse all the content to generate the index.
> As I also maintain a nanoc site, I'd be interested to know what solution you end up using.
> Hope this helps,
> -Bill
> If anyone has any leads, I'd appreciate it :)
> Daniel
> -- > You received this message because you are subscribed to the Boston Ruby Group mailing list
> To post to this group, send email to boston-rubygroup@googlegroups.com
> To unsubscribe from this group, send email to boston-rubygroup-unsubscribe@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/boston-rubygroup