Code Monkey home page Code Monkey logo

mephisto's Introduction

= Installation

See public/install.html for setup instructions.

= Timezones

You MUST export the environment variable TZ=UTC, or else the article dates
and times will be invalid.

This would not be needed if rails used UTC for everything, but
unfortunately it doesn't... eg: action_view/helpers/date_helper.rb uses
Time::now instead of Timer::now.utc, and Time::mktime instead of
Time::utc.

XXX oh, we can't depend on the rails helpers at all, because they don't
    translate the time from UTC (assuming the TZ env var is correctly
    set) to site time, you've to roll our own, or monkey patch rails :/

= Dependencies

Note that Mephisto depends on fewer gems when RAILS_ENV=production than it
does in a development environment.

Run 'rake gems:install' to install the development gems.  In a production
environment, run:

  RAILS_ENV=production rake gems:install

= Syntax Coloring for code listings

Syntax coloring can be performed on code listings that occur in your articles
by surrounding them with <macro:code lang="ruby">...</macro:code> tags.  
However, for this to work, your theme must provide CodeRay css styles.  If 
you use the <macro:code> tags and don't see syntax coloring then the CodeRay
styles may be added to your current theme by customizing the theme as follows:

1.  Login to Admin (http://localhost:3000/admin) 
2.  Select 'Design' tab
3.  Click 'layout.liquid' in the list of templates in the right margin
4.  In the textfield, scroll to the bottom of the {% head %}...{% endhead %}
    section and insert the following 2 stylesheet link tags:

<link rel="stylesheet" href="/plugin_assets/filtered_column_code_macro/default_codemacro.css" type="text/css" media="screen" charset="utf-8">
<link rel="stylesheet" href="/plugin_assets/filtered_column_code_macro/default_coderay.css" type="text/css" media="screen" charset="utf-8">

These stylesheets will not only add syntax coloring - but also wrap the code 
listings with a div that will automatically add a horizontal scrollbar and 
dynamically adjust the width of the code listing to fit your layout.  You may 
want to update existing themes which already support syntax coloring to use 
these new default stylesheets since existing themes usually only display code
listings using a static width.

= License

Mephisto is distributed under the same license as Ruby on Rails. See
http://www.opensource.org/licenses/mit-license.php

mephisto's People

Contributors

bertg avatar chrismcg avatar danlynn avatar davec avatar emk avatar francois avatar isaackearse avatar james2m avatar mat avatar nick avatar psq avatar splattael avatar technoweenie avatar webmat avatar yaroslav 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.