jekyllplusadmin 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c0045a4668d8ec935e836fd190f639235776cb0
4
- data.tar.gz: 5c1410fef41efbc8b17c192e62369adae4d5e772
3
+ metadata.gz: e2e8a7353440efd754b5eb02e82c2956226ddf8e
4
+ data.tar.gz: de35b758632cac2cafdd4f2c068971399488dda4
5
5
  SHA512:
6
- metadata.gz: c72b38d645e478c8aa7495f429a7da8cd46baf728dd73519f63521d597b5a8fd71471fc49c574b3eb6fb8ad41486b8404f543f34f7dde2cd897d1a555ab0a9e9
7
- data.tar.gz: 70c732b463a4e343bb60950a4a11ff17ac77aafbbf79671d25770447ffd2af3797fa8c32dda56dbf21a5d2a316a7cbe474e12c535652b785ef7737c028f26587
6
+ metadata.gz: 52767ba682d50007f61721b452dee29cf933b69e7a7f6562dc1fbaa4d7416f0ff266ee5fb6dc19d8108bb03ea51d1e17fcbb222a0b46206c4f48b5ccdc93b4df
7
+ data.tar.gz: 5e4d119499ff9bbfa4cf681776343dfecf00fe01481ec53024b6588d534a293e02fad29d96d9cfeaac7c1a05b16f7d865fd6c0df9d22c20bbf0130170ce71fad
@@ -1,60 +1,24 @@
1
1
  # [Jekyll](http://jekyllrb.com/)
2
2
 
3
- [![Gem Version](https://img.shields.io/gem/v/jekyll.svg)][ruby-gems]
4
- [![Build Status](https://travis-ci.org/jekyll/jekyll.svg?branch=master)][travis]
5
- [![Test Coverage](https://codeclimate.com/github/jekyll/jekyll/badges/coverage.svg)][coverage]
6
- [![Code Climate](https://codeclimate.com/github/jekyll/jekyll/badges/gpa.svg)][codeclimate]
7
- [![Dependency Status](https://gemnasium.com/jekyll/jekyll.svg)][gemnasium]
8
- [![Security](https://hakiri.io/github/jekyll/jekyll/master.svg)][hakiri]
9
-
10
- [ruby-gems]: https://rubygems.org/gems/jekyll
11
- [gemnasium]: https://gemnasium.com/jekyll/jekyll
12
- [codeclimate]: https://codeclimate.com/github/jekyll/jekyll
13
- [coverage]: https://codeclimate.com/github/jekyll/jekyll/coverage
14
- [hakiri]: https://hakiri.io/github/jekyll/jekyll/master
15
- [travis]: https://travis-ci.org/jekyll/jekyll
16
-
17
- By Tom Preston-Werner, Nick Quaranto, Parker Moore, and many [awesome contributors](https://github.com/jekyll/jekyll/graphs/contributors)!
18
-
19
3
  Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind [GitHub Pages](http://pages.github.com), which you can use to host sites right from your GitHub repositories.
20
4
 
21
- ## Philosophy
22
-
23
- Jekyll does what you tell it to do — no more, no less. It doesn't try to outsmart users by making bold assumptions, nor does it burden them with needless complexity and configuration. Put simply, Jekyll gets out of your way and allows you to concentrate on what truly matters: your content.
5
+ **This repository is Jekyll + admin (to add posts dynamically). All the credits goes to the Jekyll team, this gem only gives an extra end point to add posts dynamically**
24
6
 
25
- ## Having trouble with OS X El Capitan?
7
+ ## Want to know more about jekyll?
26
8
 
27
- See: http://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011
9
+ Visit :- https://github.com/jekyll/jekyll
28
10
 
29
11
  ## Getting Started
12
+ * gem install jekyllplusadmin (sudo if necessary)
13
+ * Now download your favorite Jekyll theme
14
+ * Copy /admin folder to base of your Jekyll theme and reset the config
15
+ * Copy admin.css from /admin/admin.css to css folder of your jekyll theme
16
+ * Run jekyll serve and visit your_served_url/admin
30
17
 
31
- * [Install](http://jekyllrb.com/docs/installation/) the gem
32
- * Read up about its [Usage](http://jekyllrb.com/docs/usage/) and [Configuration](http://jekyllrb.com/docs/configuration/)
33
- * Take a gander at some existing [Sites](https://wiki.github.com/jekyll/jekyll/sites)
34
- * Fork and [Contribute](http://jekyllrb.com/docs/contributing/) your own modifications
35
- * Have questions? Check out our official forum community [Jekyll Talk](https://talk.jekyllrb.com/) or [`#jekyll` on irc.freenode.net](https://botbot.me/freenode/jekyll/)
36
-
37
- ## Code of Conduct
38
-
39
- In order to have a more open and welcoming community, Jekyll adheres to a
40
- [code of conduct](CONDUCT.markdown) adapted from the Ruby on Rails code of
41
- conduct.
42
-
43
- Please adhere to this code of conduct in any interactions you have in the
44
- Jekyll community. It is strictly enforced on all official Jekyll
45
- repositories, websites, and resources. If you encounter someone violating
46
- these terms, please let a maintainer (@parkr, @envygeeks, or @mattr-) know
47
- and we will address it as soon as possible.
48
-
49
- ## Diving In
50
18
 
51
- * [Migrate](http://import.jekyllrb.com/docs/home/) from your previous system
52
- * Learn how the [YAML Front Matter](http://jekyllrb.com/docs/frontmatter/) works
53
- * Put information on your site with [Variables](http://jekyllrb.com/docs/variables/)
54
- * Customize the [Permalinks](http://jekyllrb.com/docs/permalinks/) your posts are generated with
55
- * Use the built-in [Liquid Extensions](http://jekyllrb.com/docs/templates/) to make your life easier
56
- * Use custom [Plugins](http://jekyllrb.com/docs/plugins/) to generate content specific to your site
19
+ ## Wish to contribute?
57
20
 
58
- ## License
21
+ * Fork this repository
22
+ * Open a pull request
23
+ * Or mail me at sahilbathla1@gmail.com
59
24
 
60
- See [LICENSE](https://github.com/jekyll/jekyll/blob/master/LICENSE).
@@ -9,6 +9,13 @@ module Jekyll
9
9
  "no-store, no-cache, must-revalidate"
10
10
  }
11
11
 
12
+ def basic_auth(request, response)
13
+ WEBrick::HTTPAuth.basic_auth(request, response, 'My Realm') do |user, pass|
14
+ credentials = SafeYAML.load_file(Jekyll::Configuration::DEFAULTS['source'] + '/admin/config.yml')
15
+ user == credentials['user'] && pass == credentials['password']
16
+ end
17
+ end
18
+
12
19
  def initialize(server, root, callbacks)
13
20
  # So we can access them easily.
14
21
  @jekyll_opts = server.config[:JekyllOptions]
@@ -28,6 +35,7 @@ module Jekyll
28
35
  #
29
36
 
30
37
  def do_GET(req, res)
38
+ basic_auth(req, res)
31
39
  rtn = super
32
40
  validate_and_ensure_charset(req, res)
33
41
  res.header.merge!(@headers)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyllplusadmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sahil Batla
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-08 00:00:00.000000000 Z
11
+ date: 2016-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid