GithubHelp home page GithubHelp logo

00mjk / zettelkasten.de Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zettelkasten-method/zettelkasten.de

0.0 0.0 0.0 132.59 MB

Website

Home Page: http://zettelkasten.de

Ruby 20.71% HTML 28.52% JavaScript 0.52% SCSS 49.86% CSS 0.39%

zettelkasten.de's Introduction

What's this

This is my personal boilerplate setup for nanoc websites.

Deployment

I assume you're public html folder is called htdocs/ and you can create new folders below your domains folder but outside htdocs/.

I also assume you use my Rakefile: upon rake build it will checkout the branch 'deploy' and put all files from output/ in there. Uploading from 'deploy' to the production server will only copy the HTML output, not the nanoc setup.

  • initialize bare production git repository on the server:

    $ git init --bare ~/doms/example.com/git
    
  • you'll want automatic updates when you push to the server. Use git's own post-receive hook:

    # add to ~/doms/example.com/git/hooks/post-receive
    echo "Updating website ..."
    cd /the/full/path/to/doms/example.com/htdocs || exit
    unset GIT_DIR
    git pull origin 
    echo "Update complete."
    

    Make it executable:

    $ chmod +x post-receive
    
  • initialize git repository in htdocs/. This will point to the bare repository on the server and check out the current version:

    # given you're in ~/doms/example.com/htdocs
    $ git init
    $ git remote add origin ../git
    
    # setup branch to pull from:
    $ git config branch.master.remote origin
    $ git config branch.master.merge refs/heads/deploy
    
  • setup production server locally:

    $ git remote add production ssh://[email protected]/~/doms/example.com/git/
    $ git remote show production
    
  • commit changes locally and put them on the server:

    $ git commit
    $ rake build
    $ git push production deploy
    

    You can push all branches via git push production to backup your code. Only the branch 'deploy' will be visible to the public.

zettelkasten.de's People

Contributors

arcturus140 avatar dependabot[bot] avatar divinedominion avatar

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.