justinsaul / snips Goto Github PK
View Code? Open in Web Editor NEWThis project forked from weepy/snips
Super Simple CMS for Rails
Home Page: http://www.parkerfox.co.uk/labs/snips
License: MIT License
This project forked from weepy/snips
Super Simple CMS for Rails
Home Page: http://www.parkerfox.co.uk/labs/snips
License: MIT License
Snips ===== Super::Simple::Content::Management Note if you are viewing this in plain text - please ignore the <pre> tags around the code snippets Install --- * Add the following to your layouts <pre> <% if session[:snips] != nil %> <%= stylesheet_link_tag '/snips/stylesheets/snips' %> <%= javascript_include_tag '/snips/javascripts/jquery', '/snips/javascripts/form' ,'/snips/javascripts/snips' %> <% end %> </pre> * run a migration with following: <pre> create_table "snips", :force => true do |t| t.string "path" t.text "raw_text" t.datetime "created_at" t.datetime "updated_at" t.string "layout" t.string "render_type", :limit => 50 end </pre> * Start your server Login --- * Go to /snips * If you've set up authentication, you will be asked for your credentials * Once logged in you can add/edit snips * You can also edit the site inline once logged in - just click on the <div class="snip_edit" style="display: inline; position: relative">edit โ </div> Authentication ---- * To protect the snips admin add the following to environment.rb: <pre> ::Snips.protect _username_, _password_ </pre> Wiring up the root directory ------ * Add the following to your routes (above the map.snips) <pre> map.root :controller => "snips", :action => "render_snip", :path => "my-index-page" </pre> Render types --- Snips supports the following * Plain text/HTML * Markdown/Textile via Redcloth3 * ERB * HAML Be aware that ERB and HAML can run arbitrary ruby. This can be very useful, but also be aware of the security implications. Advanced === Referencing other snips --- You can reference other snips inside snips using the notation <pre>{{snip-path}}</pre> * Be careful of cyclic references which will be fatal! Rendering a snip in your own code --- You can simply do <pre>@snip.render_text</pre>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.