GithubHelp home page GithubHelp logo

saurus's Introduction

saurus logo

SAURUS

Git to Blog: Blog engine for web developer.

USAGE

We assume git and php has been installed and current directory is root of the localhost directory. Also assumed were we already has our own github.io page and we will deploy our blog there. Thus:

  1. mkdir blog
  2. cd blog
  3. git init
  4. git remote add origin [email protected]:username/username.github.io.git
  5. git pull origin master
  6. git remote add saurus https://github.com/robotys/saurus.git
  7. git pull saurus master
  8. make changes
  9. git add -A
  10. git commit -m 'first post'
  11. git push origin master

Development Notes / Basic Concepts

Main idea is a fork of jeckyl. Saurus will generate a 'semi-static' website given a markdown directory full of articles in markdown format.

Semi Static Engine

Unlike jeckyl, Saurus WILL NOT generate the entirety of the html files. Meaning if you have like thousands of articles, it will not generate thousands of html file. That will be ridiculous!. I do not need extra hours everytime i need to publish new article just waiting the static files generate from my first of thousand post.

That is the main intention.

So, we achieve (more like we workaround) this target by leveraging ajax. We need semi-dynamic to achieve semi-static right?

Reading Data Flow

Everytime user call a post via hashbang routing, let say http://blogonsaurus.com/#/read/markdown-example, there will be a function that will fetch the slug part and compare with index in json.

From there, we call the file needed from mds directory, parse it through markdown-html parser written in js, and then display it in body content.

Saurus public generation

To generate the files and dirs, run gen.php from local Apache-PHP server. Can also frun from command line but where is the fun in that? Better to run in full Apache-PHP environment as we can check the files generated from localhost server directly before git the public directory to live server.

Saurus User Case

Author a post in markdown format -> save in post directory -> run gen.php -> check from localhost/public for the changes -> git it upstream to live server

License: MIT

saurus's People

Contributors

robotys avatar

Watchers

 avatar James Cloos avatar

Forkers

akarniaga

saurus's Issues

Wordpress importer

Import all posts from wordpress database.

1- Connect to database
2- get all the contents
3- change to markdown
4- save into post directory with published date

gen.php to regenerate index.

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.