GithubHelp home page GithubHelp logo

rain's Introduction

Welcome To Rain

Photo by Mike Kotsch on Unsplash

The main reason Rain was developed is to create a blog engine that is really integrated to my current workflow in developing Web Application. Said workflow is: Write in Text Editor -> Git Commit -> Git Push.

And the rest is taken up by Continuous Integration setup.

As i'm already writing extensively in markdown format for documentations, and once in a while post in my wordpress blog as markdown format too, then why not make a blog engine completely from ground up with Git And Markdown at its core.

Thus Rain was born.

Written from scratch in PHP with no framework, no database and only 1 library (Parsedown, excellent tool!) disregarding any new convention and cool programming paradigm.

Yep, not even OOP (except for Parsedown anyway).

Which means: 1) It is very easy to start hacking Rain functionality away and 2) It is not the most beautiful code in existence. Imagine the beauty of Laravel source code, and now only take 1% of it, that is Rain. :-D

Well, the only thing that it has is theme engine, which is quite minimal too. Take a look at this index.php file that you are looking at:

<?php 
	include('header.php');
 				
	$posts = post_list();

	if(count($posts) === 0){
		echo 'No Post';
	}else{
		
		foreach($posts as $post){
			echo '<h1><a href="/read/'.$post['slug'].'">'.strtoupper($post['title']).'</a></h1>';
			echo get_post($post['slug']);
			echo '<br/>';
		}

	}

	include('footer.php');
?>

Hell yeah blogging gets so simple!

Another point: without database in place, all of the post write up and its metadata is saved as plain text file. Posts is saved as .md while metada is saved as .json as you guessed it, json format.

This effectively made it very fast and nimble for small and personal project. (Going to benchmark it soon).

List

Requirements to use Rain:

  1. PHP 5
  2. Apache (NGINX soon)
  3. Git 4.Good text editor (Pick your poison)

What Rain did not have:

  1. User login online.
  2. Category. but we do have tags
  3. Dashboard. This is not Wordpress
  4. WYSIWYG editor. Again, this is not Wordpress!
  5. Comments. Use Disqus instead.

What i've planned for Rain:

  1. CDN compatible
  2. Simple Analytics
  3. Subscription / Newsletter with AWS integration

Which brings this rant post to its main caveat: if you are not web developer, and not familiar with git workflow, most likely Rain is not for you.

For 1% of you that fall in that little spot: hey buddies!

Install

We have two routes to install Rain. First, the easiest and preferred method: via Composer. Last is via plain download and extract to your directory.

Composer method:

  1. cd to your web root. Create new one if necessary.
  2. Initite git: git init
  3. Add robotys/rain as remote rain: git remote add rain [email protected]:robotys/rain.git
  4. Pull latest code: git pull rain master
  5. Open your directory in browser.

Done!

If you cannot wrap your mind around that git, specifically 'why remote add rain, not remote add origin?', then please google around. In short: remote rain so that you can pull latest version easily, and remote origin is for your blog repo.

We did not want you to push your blog to rain repo right.

Download method:

  1. Download zip from github page. Or just click here to download latest version.
  2. Extract it inside your root directory
  3. Run your webserver (apache)
  4. Open it from your browser

If any of above steps is mindboggling to you, then please stop now and read some more on managing local web server. Digital Ocean article is good for that.

Thank you for trying Rain!

Izwan Robotys Cute Face
Izwan Robotys
Kuala Lumpur

ps: If you have any suggestion to further simplify Rain, please do so in github issues. Better yet: fork and pull request.
pps: Rain was released under MIT opensource license. Have no fear of using it in any way whatsoever.

rain's People

Contributors

robotys avatar

Stargazers

Mohd Farhan Firdaus Jamil avatar

Watchers

 avatar James Cloos 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.