deplot 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +4 -0
- data/LICENSE +19 -0
- data/README.md +53 -0
- data/bin/deplot +10 -15
- data/deplot.gemspec +21 -0
- metadata +42 -7
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2012 Cyril Nusko
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to
|
5
|
+
deal in the Software without restriction, including without limitation the
|
6
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
7
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
16
|
+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
18
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
19
|
+
IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
deplot
|
2
|
+
======
|
3
|
+
|
4
|
+
Deplot is a static web site generator with a ruby DSL.
|
5
|
+
|
6
|
+
Usage
|
7
|
+
-----
|
8
|
+
|
9
|
+
Deplot separates content from markup. If the deplot gem is installed, calling `deplot new <project_name>` will create a project directory with all the files and directories needed to get a new site started. You can also use an existing skeleton with `deplot new <project_name> <git_url>`, which will clone the specified git repo. Deplot's built upon a custom DSL that's used to describe your site's pages (in the `Deplotfile`):
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
path "/" do
|
13
|
+
render "index.markdown"
|
14
|
+
end
|
15
|
+
|
16
|
+
publish
|
17
|
+
```
|
18
|
+
|
19
|
+
You can create multiple pages from multiple source files with `render_all` (the `#` is replaced by the file name with `.html` extension):
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
path "/blog/#" do # will create /blog/<file_name>.html
|
23
|
+
render_all "blog/"
|
24
|
+
end
|
25
|
+
```
|
26
|
+
|
27
|
+
or create an index file from multiple sources:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
path "/blog/" do # will create /blog/index.html
|
31
|
+
render_all "blog/"
|
32
|
+
end
|
33
|
+
```
|
34
|
+
|
35
|
+
Deplot uses [tilt][tilt] to render the source and layout file/s, so it can be used with almost every markup language and template engine.
|
36
|
+
|
37
|
+
Assets like `LESS`, `SASS` or `CoffeeScript` files are compiled by [guard][guard], which will also call deplot if any content or layout changes. Take a look at the default `Guardfile`, which has usable default settings. Or just run `guard` and press `enter` to compile everything.
|
38
|
+
|
39
|
+
Since all files are compiled into the root directory of the project, you can deploy your site with [git-ftp][git-ftp] - the project's page has details on how to deploy a git repo with git-ftp.
|
40
|
+
|
41
|
+
Development
|
42
|
+
-----------
|
43
|
+
|
44
|
+
To use the latest version, you will need to manually build and install the gem. A `gem build deplot.gemspec; sudo gem install deplot-0.0.x.x.gem` in the cloned repo will suffice.
|
45
|
+
|
46
|
+
License
|
47
|
+
-------
|
48
|
+
|
49
|
+
See LICENSE file.
|
50
|
+
|
51
|
+
[tilt]: https://github.com/rtomayko/tilt
|
52
|
+
[guard]: https://github.com/guard/guard
|
53
|
+
[git-ftp]: https://github.com/resmo/git-ftp
|
data/bin/deplot
CHANGED
@@ -438,32 +438,27 @@ The basic syntax to describe a page of your site is to call `path` with the page
|
|
438
438
|
as a string and with a block containing the specific instructions, like the `render`
|
439
439
|
method:
|
440
440
|
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
end
|
445
|
-
```
|
441
|
+
path '/' do
|
442
|
+
render "index.markdown"
|
443
|
+
end
|
446
444
|
|
447
445
|
This is, by the way, also the code that is used to generate this introduction page.
|
448
446
|
To render more than one file, for example all files in a directory called `blog/`,
|
449
447
|
you can use `render_all`:
|
450
448
|
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
end
|
455
|
-
```
|
449
|
+
path '/blog/#'
|
450
|
+
render_all "blog/"
|
451
|
+
end
|
456
452
|
|
457
453
|
The symbol `#` will then be replaced by the name of the source file (without its
|
458
454
|
extension and with `.html` at the end). Omitting the symbol will cause deplot to render
|
459
455
|
all source files into one single file. The code below will produce an index file
|
460
456
|
`blog/index.html` that uses another layout (`layout_index.erb`).
|
461
457
|
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
end
|
458
|
+
path '/blog/'
|
459
|
+
layout "layout_index.erb"
|
460
|
+
render_all "blog/"
|
461
|
+
end
|
467
462
|
|
468
463
|
## Editing content
|
469
464
|
|
data/deplot.gemspec
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'deplot'
|
3
|
+
s.version = '0.0.1'
|
4
|
+
s.date = '2012-04-09'
|
5
|
+
s.description = "A ruby static web site generator"
|
6
|
+
s.summary = s.description
|
7
|
+
s.authors = ["Cyril Nusko"]
|
8
|
+
s.email = 'gitcdn@gmail.com'
|
9
|
+
s.files = ["bin/deplot"]
|
10
|
+
s.homepage = 'http://www.github.com/cdn64/deplot'
|
11
|
+
s.executables << 'deplot'
|
12
|
+
s.files = %w[
|
13
|
+
Gemfile
|
14
|
+
LICENSE
|
15
|
+
README.md
|
16
|
+
bin/deplot
|
17
|
+
deplot.gemspec
|
18
|
+
]
|
19
|
+
s.add_dependency 'thor', "~> 0.14.6"
|
20
|
+
s.add_dependency 'tilt', "~> 1.3.3"
|
21
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deplot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Cyril Nusko
|
@@ -15,9 +15,40 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
dependencies:
|
20
|
-
|
18
|
+
date: 2012-04-09 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: thor
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ~>
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 43
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
- 14
|
32
|
+
- 6
|
33
|
+
version: 0.14.6
|
34
|
+
type: :runtime
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: tilt
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ~>
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 29
|
45
|
+
segments:
|
46
|
+
- 1
|
47
|
+
- 3
|
48
|
+
- 3
|
49
|
+
version: 1.3.3
|
50
|
+
type: :runtime
|
51
|
+
version_requirements: *id002
|
21
52
|
description: A ruby static web site generator
|
22
53
|
email: gitcdn@gmail.com
|
23
54
|
executables:
|
@@ -27,7 +58,11 @@ extensions: []
|
|
27
58
|
extra_rdoc_files: []
|
28
59
|
|
29
60
|
files:
|
61
|
+
- Gemfile
|
62
|
+
- LICENSE
|
63
|
+
- README.md
|
30
64
|
- bin/deplot
|
65
|
+
- deplot.gemspec
|
31
66
|
homepage: http://www.github.com/cdn64/deplot
|
32
67
|
licenses: []
|
33
68
|
|
@@ -60,6 +95,6 @@ rubyforge_project:
|
|
60
95
|
rubygems_version: 1.8.12
|
61
96
|
signing_key:
|
62
97
|
specification_version: 3
|
63
|
-
summary:
|
98
|
+
summary: A ruby static web site generator
|
64
99
|
test_files: []
|
65
100
|
|