newport 1.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.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +16 -0
  4. data/exe/newport +37 -0
  5. metadata +128 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9141bdcbe6737b32ad005ecd749053a9dc24c5afd9e5fa457f413edd4be6597a
4
+ data.tar.gz: 43ce776990bfd7de9d55ebd0ed79d20c14e9e3993d8104237bb95289b6de7729
5
+ SHA512:
6
+ metadata.gz: 36cf90d01c5277307ddbde2143084d2763332bede40c6663a03de5c4f9eaf5b104c340ae5f3ab5f20e38d23b7e5a9e131d6d0ccdaa39e0fb2224744d4e183437
7
+ data.tar.gz: 219b6386416b869c45666812ec2419c73260ab2bf89c06c528f7bf3a97a4881734e15b998f14f5a44e3c528866de9c24e315dac9a1a9c56bd9d0da1d556b9f48
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Richjard
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # Newport
2
+ Newport is a simple Ruby script for building a single file blog/static site.
3
+
4
+ ## Getting Started
5
+ - Install Ruby
6
+ - Install the bundler gem
7
+ - Clone or download this repository
8
+ - Run `bundle`
9
+ - Modify the layouts and add some posts
10
+ - Run `bundle exec ruby build.rb`
11
+
12
+ ## Plugins
13
+ Plugins are available in the plugins directory and are pure javascript. Plugins are run after the page loads and can modify the contents.
14
+
15
+ ### Expander
16
+ For example the expander plugin will loop through your posts and show n number of paragraphs for each one and hide the rest, adding a down arrow to click to expand and show the full post.
data/exe/newport ADDED
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ $stdout.sync = true
5
+
6
+ $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
7
+
8
+ require 'newport'
9
+
10
+ Newport::Help.show && abort if ARGV.length.zero? || ARGV[0] == 'help'
11
+
12
+ case ARGV[0]
13
+ when 'new'
14
+ Newport::New.process ARGV
15
+ when 'build'
16
+ Newport::Build.process ARGV
17
+ else
18
+ Newport.logger.abort_with "fatal: 'newport #{ARGV.first}' could not be found.".red
19
+ end
20
+
21
+ # Mercenary.program(:newport) do |p|
22
+ # p.version Newport::VERSION
23
+ # p.description 'Newport is a static site blog generator written in Ruby'
24
+ # p.syntax 'newport <command>'
25
+
26
+ # Newport::Command.subclasses.each { |c| c.init_with_program(p) }
27
+
28
+ # p.action do |args, _|
29
+ # if args.empty?
30
+ # Newport.logger.error 'A subcommand is required.'
31
+ # abort
32
+ # else
33
+ # subcommand = args.first
34
+ # Newport.logger.abort_with "fatal: 'newport #{args.first}' could not be found." unless p.has_command? subcommand
35
+ # end
36
+ # end
37
+ # end
metadata ADDED
@@ -0,0 +1,128 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: newport
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Richard Fisher
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-07-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: colorator
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: kramdown
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.3'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 2.3.1
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: '2.3'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 2.3.1
47
+ - !ruby/object:Gem::Dependency
48
+ name: mercenary
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 0.3.6
54
+ - - "<"
55
+ - !ruby/object:Gem::Version
56
+ version: '0.5'
57
+ type: :runtime
58
+ prerelease: false
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: 0.3.6
64
+ - - "<"
65
+ - !ruby/object:Gem::Version
66
+ version: '0.5'
67
+ - !ruby/object:Gem::Dependency
68
+ name: rss
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: '0.2'
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 0.2.9
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '0.2'
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: 0.2.9
87
+ description: Newport is a simple static site blog generator.
88
+ email:
89
+ - richard@fisher.cymru
90
+ executables:
91
+ - newport
92
+ extensions: []
93
+ extra_rdoc_files:
94
+ - README.md
95
+ - LICENSE
96
+ files:
97
+ - LICENSE
98
+ - README.md
99
+ - exe/newport
100
+ homepage: https://github.com/richard-fisher/newport
101
+ licenses:
102
+ - MIT
103
+ metadata:
104
+ source_code_uri: https://github.com/richard-fisher/newport
105
+ bug_tracker_uri: https://github.com/richard-fisher/newport/issues
106
+ changelog_uri: https://github.com/richard-fisher/newport/releases
107
+ homepage_uri: https://github.com/richard-fisher/newport
108
+ post_install_message:
109
+ rdoc_options:
110
+ - "--charset=UTF-8"
111
+ require_paths:
112
+ - lib
113
+ required_ruby_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: 2.4.0
118
+ required_rubygems_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: 2.7.0
123
+ requirements: []
124
+ rubygems_version: 3.2.3
125
+ signing_key:
126
+ specification_version: 4
127
+ summary: A simple static site blog generator.
128
+ test_files: []