Giter VIP home page Giter VIP logo

middleman-casper's Introduction

middleman-casper

Casper Version

The Casper theme (Ghost) for Middleman-Blog v4.x

middleman-casper screenshot

Installation

  1. Create a new project with the template:
middleman init -T danielbayerlein/middleman-casper MY_PROJECT_FOLDER
  1. Change the casper settings in config.rb.

Usage

Start a local web server running at http://localhost:4567/ with:

bundle exec middleman server

Create a static file with:

bundle exec middleman build

For help, see the official Middleman website.

Author

Configurable in config.rb:

config[:casper] = {
  ...
  author: {
    name: 'Middleman'
  }
  ...
}

Navigation

Configurable in config.rb:

config[:casper] = {
  ...
  navigation: {
    "Home" => "/",
    "GitHub" => "https://github.com",
    "Author" => "/author/middleman/"
  }
  ...
}

Logo

Configurable in config.rb:

config[:casper] = {
  ...
  blog: {
    logo: 'my-awesome-blog-logo.png' # sources/images/my-awesome-blog-logo.png
  }
  ...
}

Pages

Content of example.html.markdown:

---
title: Example
layout: page
---

Welcome!

Covers

Covers are availible in pages and articles. Content of example.html.markdown:

---
title: Example
layout: page
cover: my-awesome-blog-cover.png # sources/images/my-awesome-blog-cover.png
---

Welcome!

Special Thanks

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

The MIT License (MIT)

Copyright (c) 2013-present Daniel Bayerlein

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

middleman-casper's People

Contributors

danielbayerlein avatar npostulart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

middleman-casper's Issues

Pagination does not work

hi,

I got this issue. When i new several articles, says "10 articles" , and I set the blog.paginate = true in config.rb
in index.html.haml


---
pageable: true
per_page: 5

---

Expected the first page will be the first five article, and the second page will be the last five article.
But the second page still get the first five article.
I try to remove the per_page in index, and set the blog.per_page in config, but it still doesn't work. Is there any configurations i set wrong?

here's my middleman-blog config:

activate :blog do |blog|
  # Matcher for blog source files
  blog.taglink = "tag/{tag}.html"

  blog.tag_template = "tag.html"

  # Enable pagination
  blog.paginate = true
  # blog.per_page = 5
end

Great job!

I've just started to use this theme with middleman and for now it's perfect for what I need.

Just wanted to say thank you :)

Creating a gem

First, thank you so much for your hard work. I really appreciate it.

I was wondering if you would consider package this up as a gem which would make the installation/upgrading process a bit simpler. Maybe similar to middleman-blog.

Add reddit share to casper fonts

Hi Daniel,

is it possible to add an icon for it? A helper-method should then have the following format:

  def reddit_url
    "https://www.reddit.com/submit?url=#{current_article_url}" \
      "&title=#{current_article.title}"
  end

Cheers,
Matthias

How do I update this theme in my project?

I installed this theme a while back and now I would like to update it. I don't see any documentation on how to do so here or on Middleman's website. I would very much prefer not to have to create a new project directory from scratch.

`tag` local conflicts with `tag` helper

Good morning,

So in the next Middleman release, we're raising an error when a local value tries to overwrite a template helper. In your template, you pass the tag: local, but in Padrino there is a tag helper for generating HTML.

This is just a heads up, if you rename that local, you'll be compatible with our upcoming release (and no longer accidentally removing access to the tag HTML helper) :)

NameError: uninitialized constant Sass

I'm getting the following when creating a brand new website:

NameError: uninitialized constant Sass
Did you mean?  SassC
	/home/calj/.rvm/gems/ruby-2.6.5/gems/middleman-sprockets-4.1.1/lib/middleman-sprockets/resource.rb:90:in `css_response'
	/home/calj/.rvm/gems/ruby-2.6.5/gems/middleman-sprockets-4.1.1/lib/middleman-sprockets/resource.rb:67:in `source'
	/home/calj/.rvm/gems/ruby-2.6.5/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:in `send_to'
	/home/calj/.rvm/gems/ruby-2.6.5/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in `call_with'
	/home/calj/.rvm/gems/ruby-2.6.5/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:in `block in redefine_method'
	/home/calj/.rvm/gems/ruby-2.6.5/gems/middleman-sprockets-4.1.1/lib/middleman-sprockets/resource.rb:30:in `block in render'
	/home/calj/.rvm/gems/ruby-2.6.5/gems/activesupport-5.2.4.4/lib/active_support/notifications.rb:170:in `instrument'
	/home/calj/.rvm/gems/ruby-2.6.5/gems/middleman-core-4.3.11/lib/middleman-core/util.rb:21:in `instrument'
	/home/calj/.rvm/gems/ruby-2.6.5/gems/middleman-sprockets-4.1.1/lib/middleman-sprockets/resource.rb:29:in `render'
	/home/calj/.rvm/gems/ruby-2.6.5/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:in `send_to'
	/home/calj/.rvm/gems/ruby-2.6.5/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in `call_with'
	/home/calj/.rvm/gems/ruby-2.6.5/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:in `block in redefine_method'
	/home/calj/.rvm/gems/ruby-2.6.5/gems/middleman-core-4.3.11/lib/middleman-core/rack.rb:113:in `process_request'
	/home/calj/.rvm/gems/ruby-2.6.5/gems/middleman-core-4.3.11/lib/middleman-core/rack.rb:67:in `block in call'
	/home/calj/.rvm/gems/ruby-2.6.5/gems/middleman-core-4.3.11/lib/middleman-core/rack.rb:66:in `catch'
	/home/calj/.rvm/gems/ruby-2.6.5/gems/middleman-core-4.3.11/lib/middleman-core/rack.rb:66:in `call'

middleman init my_project not working

here is call stack
/Users/hadronsolutions/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in require': cannot load such file -- middleman-core/cli (LoadError) from /Users/hadronsolutions/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:inrescue in require'
from /Users/hadronsolutions/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in require' from /Users/hadronsolutions/.rvm/gems/ruby-2.1.1/gems/middleman-core-3.3.6/bin/middleman:12:in<top (required)>'
from /Users/hadronsolutions/.rvm/gems/ruby-2.1.1/bin/middleman:23:in load' from /Users/hadronsolutions/.rvm/gems/ruby-2.1.1/bin/middleman:23:in

'
from /Users/hadronsolutions/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in eval' from /Users/hadronsolutions/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in'

How to make frontmatter - cover - dynamic

Loving this so much, as it is so sleek for a blog. One question, any quick fix on getting the tag.html.haml frontmatter cover to be dynamic based on the tag that is put in? i.e. I click on 'china' and it grabs my 'china.jpg' image for the cover? Any help would be appreciated :)

horizontally long code doesn't fit in nicely

Thanks for sharing a nice template, but I'm having an issue that horizontally long code doesn't fit in nicely. Like the following code, for example, should have a horizontal scroll bar, but it's not on your template.

git clone https://github.com/danielbayerlein/middleman-casper.git ~/.middleman/casper #  horizontally long code goes beyond the box without being able to scroll

I guess the following lines should fix this issue, but I don't know where to put these lines. I tried it in pre, but didn't work as I hoped.

white-space:pre-wrap;
overflow-x:scroll;
overflow-y:hidden;

Thanks,

middleman sever command not working when PC reboot

middleman server
/Users/hadronsolutions/.rvm/gems/ruby-2.1.1/gems/middleman-core-4.0.0.alpha.2/lib/middleman-core/load_paths.rb:41:in findup': undefined methodexist?' for "/Users/hadronsolutions/Projects/hotelGemfile":String (NoMethodError)
from /Users/hadronsolutions/.rvm/gems/ruby-2.1.1/gems/middleman-core-4.0.0.alpha.2/lib/middleman-core/load_paths.rb:25:in setup_bundler' from /Users/hadronsolutions/.rvm/gems/ruby-2.1.1/gems/middleman-core-4.0.0.alpha.2/lib/middleman-core/load_paths.rb:15:insetup_load_paths'
from /Users/hadronsolutions/.rvm/gems/ruby-2.1.1/gems/middleman-cli-4.0.0.alpha.2/bin/middleman:10:in <top (required)>' from /Users/hadronsolutions/.rvm/gems/ruby-2.1.1/bin/middleman:23:inload'
from /Users/hadronsolutions/.rvm/gems/ruby-2.1.1/bin/middleman:23:in `

'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.