diff --git a/README.md b/README.md index e809cc1..637d779 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,3 @@ # perc -Better Werc - - -# TODO - -- [ ] Documentation -- [ ] Adding expiry to cache files. -- [ ] Adding support for [Slim](https://slim-template.github.io/) Template -- [ ] Support for dirrent layout files for subdirectory. -- [ ] Adding search. From what I can find, there are several good tools aviable that - index the site, e.g. [sphinix](https://sphinxsearch.com/), [Apache - Lucene](https://lucene.apache.org/), and [Xapian](https://xapian.org/) - - +Better Werc \ No newline at end of file diff --git a/app.rb b/app.rb index 3f5e0cb..95cf1a1 100644 --- a/app.rb +++ b/app.rb @@ -147,17 +147,14 @@ class Sidebar end $sidebar = Sidebar.new -$files_cache = {} def pview(file) body = "" cont = File.read(file) or return "Not found" if (file =~ /\.erb$/) - # We can't cache erb tp = ERB.new(cont) body = tp.result(binding) elsif (file =~ /\.md$/) - # But we can cache markdown - body = ($files_cache[file] ||= $markdown.render cont) + body = $markdown.render cont end put_in_layout(body) end diff --git a/deploy b/deploy deleted file mode 100755 index cc529f8..0000000 --- a/deploy +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/sh - - -RUBY_YJIT_ENABLE=1 rackup \ No newline at end of file