Code Monkey home page Code Monkey logo

recept's Introduction

Recept

Enkel receptsamling i markdown-format. Varje katalog är en egen kategori. Varje fil i en katalog är ett recept.

Checka ut en lokal kopia med:

git clone https://github.com/morberg/recept.git

Generera PDF

  • Använd Atom som editor.

  • Installera paketet markdown-pdf

  • Ändra typsnitt till Avenir genom att lägga till följande i din styles.less (välj Settings->Themes->your stylesheet):

    @font-family: "Avenir", "Helvetica Neue", Helvetica, sans-serif; .markdown-preview { font-family: @font-family; h1, h2, h3, h4, h5, h6 { font-family: @font-family; } }

  • Se en preview med Ctrl+Shift+M

  • Generera PDF inifrån editorn med Shift+Cmd+C

Webbversion

Middleman och Franklin verkar funka smidigast och med minst handpåläggning.

Sätt upp Middleman och Franklin:

% gem install middleman
% git clone [email protected]:bryanbraun/franklin.git ~/.middleman/franklin

Skapa katalog för receptsamlingen och gå dit:

% middleman init recept --template=franklin
% cd recept

Lägg till följande i Gemfile:

gem 'middleman-deploy', '~> 1.0.0'

Uppdatera config.rb med följande:

activate :deploy do |deploy|
deploy.method = :git
# Optional Settings
deploy.remote   = 'https://github.com/morberg/morberg.github.io.git' # remote name or git url, default: origin
deploy.branch   = 'master' # default: gh-pages
# deploy.strategy = :submodule      # commit strategy: can be :force_push or :submodule, default: :force_push
# deploy.commit_message = 'custom-message'      # commit message (can be empty), default: Automated commit at `timestamp` by middleman-deploy `version`
end

Avsluta med att installera alla beroenden:

% bundle install  # Installs any franklin-specific gems.

Gå till source, ta bort default-filer och checka ut receptsamlingen:

% cd source
% rm *.md
% git init .
% git remote add -t \* -f origin https://github.com/morberg/recept.git
% git checkout master
% cd ..

Uppdatera data/book.yml:

---
title: Receptsamling
author: Niklas Morberg
github_url: https://github.com/morberg.github.io
domain: http://morberg.github.io/
license_name: Attribution-ShareAlike
license_url: https://creativecommons.org/licenses/by-sa/4.0
theme: epsilon

Nu är allt uppsatt. Skapa HTML-sidorna till katalogen build med:

bundle exec middleman build

Kolla eventuellt på den lokalt med:

bundle exec middleman server

och sedan

bundle exec middleman deploy

för att publicera till http://morberg.github.io.

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.