1
0
mirror of https://github.com/danbee/slugtastic synced 2025-03-04 08:49:05 +00:00

Set theme jekyll-theme-midnight and migrate Page Generator content

This commit is contained in:
Daniel Barber 2018-04-18 17:21:41 -04:00
parent ce48c0ea64
commit f4d73a09cb
5 changed files with 50 additions and 91 deletions

8
_config.yml Normal file
View File

@ -0,0 +1,8 @@
title: Slugtastic
description: A simple slug generator for Rails.
google_analytics:
show_downloads: true
theme: jekyll-theme-midnight
gems:
- jekyll-mentions

View File

@ -1,89 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen" />
<link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen" />
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print" />
<title>Slugtastic by danbee</title>
</head>
<body>
<header>
<div class="container">
<h1>Slugtastic</h1>
<h2>A simple slug generator for Rails.</h2>
<section id="downloads">
<a href="https://github.com/danbee/slugtastic/zipball/master" class="btn">Download as .zip</a>
<a href="https://github.com/danbee/slugtastic/tarball/master" class="btn">Download as .tar.gz</a>
<a href="https://github.com/danbee/slugtastic" class="btn btn-github"><span class="icon"></span>View on GitHub</a>
</section>
</div>
</header>
<div class="container">
<section id="main_content">
<h1>
<a name="slugtastic" class="anchor" href="#slugtastic"><span class="octicon octicon-link"></span></a>Slugtastic</h1>
<p>Simple gem for autogenerating permalink style slugs for your ActiveRecord models.</p>
<h2>
<a name="requirements" class="anchor" href="#requirements"><span class="octicon octicon-link"></span></a>Requirements</h2>
<ul>
<li>Ruby 1.9.2 or 1.9.3</li>
<li>Rails 3.1 or higher.</li>
</ul><p>It should work with Rails 3.0 but it hasn't been tested.</p>
<h2>
<a name="installation" class="anchor" href="#installation"><span class="octicon octicon-link"></span></a>Installation</h2>
<p>Add this line to your application's Gemfile:</p>
<pre><code>gem 'slugtastic'
</code></pre>
<p>And then execute:</p>
<pre><code>$ bundle
</code></pre>
<p>Or install it yourself as:</p>
<pre><code>$ gem install slugtastic
</code></pre>
<h2>
<a name="usage" class="anchor" href="#usage"><span class="octicon octicon-link"></span></a>Usage</h2>
<p>Usage is very simple. Just add the following to your model:</p>
<pre><code>has_slug :slug, :from =&gt; :title
</code></pre>
<p>This will generate a slug string from the title atrribute and store it in the slug attribute unless the slug already contains a string. The slug is generated pre-validation so you can still use <code>validates_presence_of :slug</code>.</p>
<p>There are no extra options at present.</p>
<h2>
<a name="contributing" class="anchor" href="#contributing"><span class="octicon octicon-link"></span></a>Contributing</h2>
<ol>
<li>Fork it</li>
<li>Create your feature branch (<code>git checkout -b my-new-feature</code>)</li>
<li>Commit your changes (<code>git commit -am 'Added some feature'</code>)</li>
<li>Push to the branch (<code>git push origin my-new-feature</code>)</li>
<li>Create new Pull Request</li>
</ol>
</section>
</div>
</body>
</html>

42
index.md Normal file
View File

@ -0,0 +1,42 @@
# Slugtastic
Simple gem for autogenerating permalink style slugs for your ActiveRecord models.
## Requirements
* Ruby 1.9.2 or 1.9.3
* Rails 3.1 or higher.
It should work with Rails 3.0 but it hasn't been tested.
## Installation
Add this line to your application's Gemfile:
gem 'slugtastic'
And then execute:
$ bundle
Or install it yourself as:
$ gem install slugtastic
## Usage
Usage is very simple. Just add the following to your model:
has_slug :slug, :from => :title
This will generate a slug string from the title atrribute and store it in the slug attribute unless the slug already contains a string. The slug is generated pre-validation so you can still use `validates_presence_of :slug`.
There are no extra options at present.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

View File

@ -1 +0,0 @@
console.log('This would be the main JS file.');

View File

@ -1 +0,0 @@
{"name":"Slugtastic","tagline":"A simple slug generator for Rails.","body":"# Slugtastic\r\n\r\nSimple gem for autogenerating permalink style slugs for your ActiveRecord models.\r\n\r\n## Requirements\r\n\r\n* Ruby 1.9.2 or 1.9.3\r\n* Rails 3.1 or higher.\r\n\r\nIt should work with Rails 3.0 but it hasn't been tested.\r\n\r\n## Installation\r\n\r\nAdd this line to your application's Gemfile:\r\n\r\n gem 'slugtastic'\r\n\r\nAnd then execute:\r\n\r\n $ bundle\r\n\r\nOr install it yourself as:\r\n\r\n $ gem install slugtastic\r\n\r\n## Usage\r\n\r\nUsage is very simple. Just add the following to your model:\r\n\r\n has_slug :slug, :from => :title\r\n\r\nThis will generate a slug string from the title atrribute and store it in the slug attribute unless the slug already contains a string. The slug is generated pre-validation so you can still use `validates_presence_of :slug`.\r\n\r\nThere are no extra options at present.\r\n\r\n## Contributing\r\n\r\n1. Fork it\r\n2. Create your feature branch (`git checkout -b my-new-feature`)\r\n3. Commit your changes (`git commit -am 'Added some feature'`)\r\n4. Push to the branch (`git push origin my-new-feature`)\r\n5. Create new Pull Request\r\n","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}