memorack 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +15 -0
- data/README.md +17 -15
- data/VERSION +1 -1
- data/lib/memorack/builder.rb +36 -2
- data/lib/memorack/cli.rb +8 -5
- data/lib/memorack/config/macro.yml +2 -0
- data/lib/memorack/core.rb +339 -47
- data/lib/memorack/locales/en.yml +1 -0
- data/lib/memorack/locales/ja.yml +1 -0
- data/lib/memorack/locals.rb +31 -1
- data/lib/memorack/locals/app.rb +16 -0
- data/lib/memorack/locals/base.rb +84 -0
- data/lib/memorack/mdmenu.rb +3 -2
- data/lib/memorack/memoapp.rb +7 -2
- data/lib/memorack/pageinfo.rb +151 -0
- data/lib/memorack/plugin.rb +54 -0
- data/lib/memorack/plugins/formats/formats.rb +12 -0
- data/lib/memorack/plugins/formats/markdown.rb +32 -0
- data/lib/memorack/plugins/formats/org.rb +54 -0
- data/lib/memorack/template/.gitignore +1 -0
- data/lib/memorack/template/plugins/.gitkeep +0 -0
- data/lib/memorack/template/themes/custom/locales/.gitkeep +0 -0
- data/lib/memorack/template/themes/custom/macro.yml +2 -0
- data/lib/memorack/template/themes/custom/pages/.gitkeep +0 -0
- data/spec/memorack_spec.rb +115 -15
- data/spec/patches/git/0001-add-HISTORY.patch +15 -0
- data/spec/patches/git/0002-change-HISTORY.patch +19 -0
- data/spec/patches/git/0003-index.html.patch +75 -0
- data/spec/patches/macro.patch +20 -0
- data/spec/patches/plugin.patch +87 -0
- metadata +24 -2
@@ -0,0 +1,20 @@
|
|
1
|
+
From ddde53a6febdced05acd0bb6b5fdb7d764ee44fc Mon Sep 17 00:00:00 2001
|
2
|
+
From: gnue <gnue@so-kukan.com>
|
3
|
+
Date: Sat, 11 May 2013 23:07:58 +0900
|
4
|
+
Subject: [PATCH] change page.title
|
5
|
+
|
6
|
+
---
|
7
|
+
themes/custom/macro.yml | 2 +-
|
8
|
+
1 file changed, 1 insertion(+), 1 deletion(-)
|
9
|
+
|
10
|
+
diff --git a/themes/custom/macro.yml b/themes/custom/macro.yml
|
11
|
+
index 9432c55..695ca34 100644
|
12
|
+
--- a/themes/custom/macro.yml
|
13
|
+
+++ b/themes/custom/macro.yml
|
14
|
+
@@ -1,2 +1,2 @@
|
15
|
+
page:
|
16
|
+
- title: '{{#content?}}{{page.name}} | {{/content?}}{{title}}'
|
17
|
+
+ title: '{{#content?}}{{page.name}} ≫ {{/content?}}{{title}}'
|
18
|
+
--
|
19
|
+
1.7.12.4 (Apple Git-37)
|
20
|
+
|
@@ -0,0 +1,87 @@
|
|
1
|
+
From 58ce135436de100df69b4638473dcad4591268f4 Mon Sep 17 00:00:00 2001
|
2
|
+
From: gnue <gnue@so-kukan.com>
|
3
|
+
Date: Sat, 11 May 2013 21:50:25 +0900
|
4
|
+
Subject: [PATCH] theme_chain plugin
|
5
|
+
|
6
|
+
---
|
7
|
+
plugins/theme_chain.rb | 14 ++++++++++++++
|
8
|
+
themes/custom/index.html | 46 ++++++++++++++++++++++++++++++++++++++++++++++
|
9
|
+
2 files changed, 60 insertions(+)
|
10
|
+
create mode 100644 plugins/theme_chain.rb
|
11
|
+
create mode 100644 themes/custom/index.html
|
12
|
+
|
13
|
+
diff --git a/plugins/theme_chain.rb b/plugins/theme_chain.rb
|
14
|
+
new file mode 100644
|
15
|
+
index 0000000..d29996b
|
16
|
+
--- /dev/null
|
17
|
+
+++ b/plugins/theme_chain.rb
|
18
|
+
@@ -0,0 +1,14 @@
|
19
|
+
+# -*- encoding: utf-8 -*-
|
20
|
+
+
|
21
|
+
+require 'memorack/locals/base'
|
22
|
+
+
|
23
|
+
+
|
24
|
+
+module MemoRack
|
25
|
+
+ class BaseLocals
|
26
|
+
+
|
27
|
+
+ define_key :theme_chain do |key|
|
28
|
+
+ @theme_chain ||= @app.themes.each.collect { |path| File.basename(path) }.join(' --> ')
|
29
|
+
+ end
|
30
|
+
+
|
31
|
+
+ end
|
32
|
+
+end
|
33
|
+
diff --git a/themes/custom/index.html b/themes/custom/index.html
|
34
|
+
new file mode 100644
|
35
|
+
index 0000000..a4523b0
|
36
|
+
--- /dev/null
|
37
|
+
+++ b/themes/custom/index.html
|
38
|
+
@@ -0,0 +1,46 @@
|
39
|
+
+<!DOCTYPE html>
|
40
|
+
+<html>
|
41
|
+
+<head>
|
42
|
+
+<meta charset="utf-8" />
|
43
|
+
+
|
44
|
+
+<style>
|
45
|
+
+ article, aside, dialog, figure, footer, header,
|
46
|
+
+ hgroup, menu, nav, section { display: block; }
|
47
|
+
+</style>
|
48
|
+
+
|
49
|
+
+<meta name="keywords" content="" />
|
50
|
+
+<meta name="description" content="" />
|
51
|
+
+<title>{{page.title}}</title>
|
52
|
+
+
|
53
|
+
+<link type="text/css" href="{{site.url}}/css/styles.css" rel="stylesheet" media="all" />
|
54
|
+
+<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
|
55
|
+
+<script type="text/javascript">
|
56
|
+
+ $(function(){
|
57
|
+
+ // 表示しているメニューを選択
|
58
|
+
+ $('#menu a[href="' + document.location.pathname + '"]').parent().addClass('selected');
|
59
|
+
+ $('#menu a[href="' + document.location + '"]').parent().addClass('selected');
|
60
|
+
+
|
61
|
+
+ // 外部サイトのリンクに target='_blank' を追加
|
62
|
+
+ $('a[href^=http]').not('[href*="://' + location.hostname + '"]').attr('target', '_blank');
|
63
|
+
+ });
|
64
|
+
+</script>
|
65
|
+
+
|
66
|
+
+</head>
|
67
|
+
+<body>
|
68
|
+
+ <div id="page">
|
69
|
+
+ <header>
|
70
|
+
+ <h1><a href="{{site.url}}/">{{title}}</a></h1>
|
71
|
+
+ </header>
|
72
|
+
+
|
73
|
+
+ <div id="content-container">
|
74
|
+
+ <div id="menu" class="importdoc">{{{__menu__}}}</div>
|
75
|
+
+ <div id="content">{{{__content__}}}</div>
|
76
|
+
+ <div class="clear"></div>
|
77
|
+
+ </div>
|
78
|
+
+
|
79
|
+
+ <footer>
|
80
|
+
+ <p>Powered by <a href="{{app.url}}" target="_blank"> {{app.name}} {{app.version}}</a> / Theme ({{theme_chain}})</p>
|
81
|
+
+ </footer>
|
82
|
+
+ </div>
|
83
|
+
+</body>
|
84
|
+
+</html>
|
85
|
+
--
|
86
|
+
1.7.12.4 (Apple Git-37)
|
87
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: memorack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gnue
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -198,20 +198,32 @@ files:
|
|
198
198
|
- lib/memorack.rb
|
199
199
|
- lib/memorack/builder.rb
|
200
200
|
- lib/memorack/cli.rb
|
201
|
+
- lib/memorack/config/macro.yml
|
201
202
|
- lib/memorack/core.rb
|
202
203
|
- lib/memorack/locales/en.yml
|
203
204
|
- lib/memorack/locales/ja.yml
|
204
205
|
- lib/memorack/locals.rb
|
206
|
+
- lib/memorack/locals/app.rb
|
207
|
+
- lib/memorack/locals/base.rb
|
205
208
|
- lib/memorack/mdmenu.rb
|
206
209
|
- lib/memorack/memoapp.rb
|
210
|
+
- lib/memorack/pageinfo.rb
|
211
|
+
- lib/memorack/plugin.rb
|
212
|
+
- lib/memorack/plugins/formats/formats.rb
|
213
|
+
- lib/memorack/plugins/formats/markdown.rb
|
214
|
+
- lib/memorack/plugins/formats/org.rb
|
207
215
|
- lib/memorack/sinatra-mustache.rb
|
208
216
|
- lib/memorack/template/.gitignore
|
209
217
|
- lib/memorack/template/.powenv
|
210
218
|
- lib/memorack/template/Gemfile
|
211
219
|
- lib/memorack/template/config.ru
|
212
220
|
- lib/memorack/template/content/README.md
|
221
|
+
- lib/memorack/template/plugins/.gitkeep
|
213
222
|
- lib/memorack/template/themes/custom/config.json
|
214
223
|
- lib/memorack/template/themes/custom/index.md
|
224
|
+
- lib/memorack/template/themes/custom/locales/.gitkeep
|
225
|
+
- lib/memorack/template/themes/custom/macro.yml
|
226
|
+
- lib/memorack/template/themes/custom/pages/.gitkeep
|
215
227
|
- lib/memorack/themes/basic/404.md
|
216
228
|
- lib/memorack/themes/basic/config.json
|
217
229
|
- lib/memorack/themes/basic/css/2-column.scss
|
@@ -227,6 +239,11 @@ files:
|
|
227
239
|
- lib/memorack/version.rb
|
228
240
|
- memorack.gemspec
|
229
241
|
- spec/memorack_spec.rb
|
242
|
+
- spec/patches/git/0001-add-HISTORY.patch
|
243
|
+
- spec/patches/git/0002-change-HISTORY.patch
|
244
|
+
- spec/patches/git/0003-index.html.patch
|
245
|
+
- spec/patches/macro.patch
|
246
|
+
- spec/patches/plugin.patch
|
230
247
|
- spec/spec_helper.rb
|
231
248
|
- REVISION
|
232
249
|
homepage: https://github.com/gnue/memorack
|
@@ -256,4 +273,9 @@ specification_version: 4
|
|
256
273
|
summary: Rack Application for markdown memo
|
257
274
|
test_files:
|
258
275
|
- spec/memorack_spec.rb
|
276
|
+
- spec/patches/git/0001-add-HISTORY.patch
|
277
|
+
- spec/patches/git/0002-change-HISTORY.patch
|
278
|
+
- spec/patches/git/0003-index.html.patch
|
279
|
+
- spec/patches/macro.patch
|
280
|
+
- spec/patches/plugin.patch
|
259
281
|
- spec/spec_helper.rb
|