Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to self-hosted documentation #1270

Merged
merged 4 commits into from
Jul 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ end

# Needed for a Rake task
gem 'git'
gem 'yard'

group :development do
gem 'pry'

# docs
gem 'yard'
gem 'github-markup'

# for visual tests
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Build Status](https://secure.travis-ci.org/rouge-ruby/rouge.svg)](https://travis-ci.org/rouge-ruby/rouge)
[![Gem Version](https://badge.fury.io/rb/rouge.svg)](https://rubygems.org/gems/rouge)
[![YARD Docs](http://img.shields.io/badge/yard-docs-blue.svg)](https://rouge-ruby.github.io/docs/)

[rouge]: http://rouge.jneen.net/

Expand Down Expand Up @@ -159,13 +160,13 @@ To test a lexer visually, run `rackup` from the root and go to `localhost:9292/#

### API Documentation

is at http://rubydoc.info/gems/rouge/frames.
is at https://rouge-ruby.github.io/docs/.

### Developing lexers

We have [a guide][lexer-dev-doc] on lexer development in the documentation but you'll also learn a lot by reading through the existing lexers.

[lexer-dev-doc]: https://www.rubydoc.info/github/rouge-ruby/rouge/file/docs/LexerDevelopment.md
[lexer-dev-doc]: https://rouge-ruby.github.io/docs/file.LexerDevelopment.html

Please don't submit lexers that are largely copy-pasted from other files.

Expand Down
5 changes: 3 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ require "bundler/gem_tasks" # Adds the :build, :install and :release tasks
require "rake/clean" # Adds the :clean and :clobber tasks
require "rake/testtask"
require "rubocop/rake_task"
require "yard"

# Add tasks
task :check => ["check:specs", :newline, "check:style"]
task :check => ["check:specs", "check:style"]
task :default => [:check]
task :test => [:check]

# Add pre-requisites
task :build => [:clean, :check]
task :build => [:clean, :check, "generate:docs"]

# Add utility tasks
task :newline do
Expand Down
6 changes: 4 additions & 2 deletions rouge.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ Gem::Specification.new do |s|
s.licenses = ['MIT', 'BSD-2-Clause']
s.required_ruby_version = '>= 2.0'
s.metadata = {
'source_code_uri' => 'https://github.com/jneen/rouge',
'changelog_uri' => 'https://github.com/jneen/rouge/blob/master/CHANGELOG.md'
"bug_tracker_uri" => "https://github.com/rouge-ruby/rouge/issues",
"changelog_uri" => "https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md",
"documentation_uri" => "https://rouge-ruby.github.io/docs/",
"source_code_uri" => "https://github.com/rouge-ruby/rouge"
}
end
8 changes: 8 additions & 0 deletions tasks/generate/docs.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace :generate do
desc "Generate YARD documentation"
YARD::Rake::YardocTask.new(:docs) do |t|
t.files = ["lib/**/*.rb", "-", "docs/*.md"]
t.options = ["--no-private", "--protected", "--markup-provider=redcarpet",
"--markup=markdown"]
end
end