diff options
author | Connor Shea <connor.james.shea@gmail.com> | 2016-10-06 08:40:24 +0300 |
---|---|---|
committer | Connor Shea <connor.james.shea@gmail.com> | 2016-10-06 08:40:24 +0300 |
commit | 764ca757a5584314c2a5515140b523f52c9d6997 (patch) | |
tree | 585ba3f994ca8392b5ee4f2097eda06990e0728c |
Init repo.
-rw-r--r-- | .gitignore | 10 | ||||
-rw-r--r-- | Gemfile | 11 | ||||
-rw-r--r-- | Gemfile.lock | 73 | ||||
-rw-r--r-- | Guardfile | 22 | ||||
-rw-r--r-- | README.md | 10 | ||||
-rw-r--r-- | Rules | 39 | ||||
-rw-r--r-- | content/index.html | 4 | ||||
-rw-r--r-- | content/stylesheet.scss | 100 | ||||
-rw-r--r-- | layouts/default.html | 22 | ||||
-rw-r--r-- | nanoc.yaml | 90 |
10 files changed, 381 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..abc21828 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# For projects using nanoc (http://nanoc.ws/) + +# Default location for output, needs to match output_dir's value found in config.yaml +output/ + +# Temporary file directory +tmp/ + +# Crash Log +crash.log diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..a76e3c29 --- /dev/null +++ b/Gemfile @@ -0,0 +1,11 @@ +source 'http://rubygems.org' +ruby '2.3.1' + +gem 'nanoc', '~> 4.0' +gem 'adsf' +gem 'sass' +gem 'kramdown' + +group :nanoc do + gem 'guard-nanoc' +end diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000..a14c37ff --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,73 @@ +GEM + remote: http://rubygems.org/ + specs: + adsf (1.2.1) + rack (>= 1.0.0) + coderay (1.1.1) + colored (1.2) + concurrent-ruby (1.0.2) + cri (2.7.0) + colored (~> 1.2) + ffi (1.9.14) + formatador (0.2.5) + guard (2.14.0) + formatador (>= 0.2.4) + listen (>= 2.7, < 4.0) + lumberjack (~> 1.0) + nenv (~> 0.1) + notiffany (~> 0.0) + pry (>= 0.9.12) + shellany (~> 0.0) + thor (>= 0.18.1) + guard-compat (1.2.1) + guard-nanoc (2.1.0) + guard (~> 2.8) + guard-compat (~> 1.0) + nanoc (~> 4.0) + hamster (3.0.0) + concurrent-ruby (~> 1.0) + kramdown (1.12.0) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + lumberjack (1.0.10) + method_source (0.8.2) + nanoc (4.3.4) + cri (~> 2.3) + hamster (~> 3.0) + ref (~> 2.0) + nenv (0.3.0) + notiffany (0.1.1) + nenv (~> 0.1) + shellany (~> 0.0) + pry (0.10.4) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + rack (2.0.1) + rb-fsevent (0.9.7) + rb-inotify (0.9.7) + ffi (>= 0.5.0) + ref (2.0.0) + ruby_dep (1.4.0) + sass (3.4.22) + shellany (0.0.1) + slop (3.6.0) + thor (0.19.1) + +PLATFORMS + ruby + +DEPENDENCIES + adsf + guard-nanoc + kramdown + nanoc (~> 4.0) + sass + +RUBY VERSION + ruby 2.3.1p112 + +BUNDLED WITH + 1.13.2 diff --git a/Guardfile b/Guardfile new file mode 100644 index 00000000..a878a439 --- /dev/null +++ b/Guardfile @@ -0,0 +1,22 @@ +# A sample Guardfile +# More info at https://github.com/guard/guard#readme + +## Uncomment and set this to only include directories you want to watch +# directories %w(app lib config test spec features) \ +# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")} + +## Note: if you are using the `directories` clause above and you are not +## watching the project directory ('.'), then you will want to move +## the Guardfile to a watched dir and symlink it back, e.g. +# +# $ mkdir config +# $ mv Guardfile config/ +# $ ln -s config/Guardfile . +# +# and, you'll have to watch "config/Guardfile" instead of "Guardfile" + +guard 'nanoc' do + watch('nanoc.yaml') # Change this to config.yaml if you use the old config file name + watch('Rules') + watch(%r{^(content|layouts|lib)/.*$}) +end diff --git a/README.md b/README.md new file mode 100644 index 00000000..9e702274 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# GitLab Documentation + +This site is generated using [Nanoc](http://nanoc.ws). + +To set this up: + +- `bundle install` +- `bundle exec nanoc live` + +Changes will be reloaded automatically using [Guard Nanoc](https://github.com/guard/guard-nanoc). @@ -0,0 +1,39 @@ +#!/usr/bin/env ruby + +compile '/**/*.html' do + layout '/default.*' +end + +# This is an example rule that matches Markdown (.md) files, and filters them +# using the :kramdown filter. It is commented out by default, because kramdown +# is not bundled with Nanoc or Ruby. +# +compile '/**/*.md' do + filter :kramdown + layout '/default.*' +end + +compile '/content/stylesheet.scss' do + filter :sass, syntax: :scss + write item.identifier.without_ext + '.css' +end + +route '/**/*.scss' do + item.identifier.without_ext + '.css' +end + +route '/**/*.{html,md}' do + if item.identifier =~ '/index.*' + '/index.html' + else + item.identifier.without_ext + '/index.html' + end +end + +compile '/**/*' do + unless item.identifier.ext == 'scss' + write item.identifier.to_s + end +end + +layout '/**/*', :erb diff --git a/content/index.html b/content/index.html new file mode 100644 index 00000000..901125c0 --- /dev/null +++ b/content/index.html @@ -0,0 +1,4 @@ +--- +title: GitLab Documentation +--- + diff --git a/content/stylesheet.scss b/content/stylesheet.scss new file mode 100644 index 00000000..f4a9fcb2 --- /dev/null +++ b/content/stylesheet.scss @@ -0,0 +1,100 @@ +*, *::before, *::after { + margin: 0; + padding: 0; + + font-family: 'Helvetica Neue', sans-serif; +} + +body { + background: #fff; +} + +a { + text-decoration: none; +} + +a:link, +a:visited { + color: #f30; +} + +a:hover { + color: #f90; +} + +#main { + position: absolute; + top: 40px; + left: 280px; + + width: 500px; +} + +#main h1 { + font-size: 40px; + font-weight: normal; + + line-height: 40px; + + letter-spacing: -1px; +} + +#main p { + margin: 20px 0; + + font-size: 15px; + + line-height: 20px; +} + +#main ul, #main ol { + margin: 20px; +} + +#main li { + font-size: 15px; + + line-height: 20px; +} + +#main ul li { + list-style-type: square; +} + +.header { + position: relative; + + width: 100%; + + padding: 10px 20px; + + border-bottom: 1px solid #ccc; + + text-align: left; +} + +.header h2 { + text-transform: uppercase; + + font-size: 13px; + + color: #333; + + letter-spacing: 1px; + + line-height: 20px; + display: inline-block; +} + +.header ul { + list-style-type: none; + + display: inline-block; +} + +.header li { + font-size: 14px; + display: inline-block; + + line-height: 20px; +} diff --git a/layouts/default.html b/layouts/default.html new file mode 100644 index 00000000..c9d9be60 --- /dev/null +++ b/layouts/default.html @@ -0,0 +1,22 @@ +<!DOCTYPE HTML> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>GitLab Documentation - <%= @item[:title] %></title> + <link rel="stylesheet" href="/stylesheet.css"> + + <!-- you don't need to keep this, but it's cool for stats! --> + <meta name="generator" content="Nanoc <%= Nanoc::VERSION %>"> + </head> + <body> + <div id="main"> + <%= yield %> + </div> + <div class="header"> + <h2>GitLab Documentation</h2> + <ul> + <li><a href="http://nanoc.ws/about/">About</a></li> + </ul> + </div> + </body> +</html> diff --git a/nanoc.yaml b/nanoc.yaml new file mode 100644 index 00000000..b7dd1b36 --- /dev/null +++ b/nanoc.yaml @@ -0,0 +1,90 @@ +# The syntax to use for patterns in the Rules file. Can be either `"glob"` +# (default) or `"legacy"`. The former will enable glob patterns, which behave +# like Ruby’s File.fnmatch. The latter will enable Nanoc 3.x-style patterns. +string_pattern_type: glob + +# A list of file extensions that Nanoc will consider to be textual rather than +# binary. If an item with an extension not in this list is found, the file +# will be considered as binary. +text_extensions: [ 'adoc', 'asciidoc', 'atom', 'coffee', 'css', 'erb', 'haml', 'handlebars', 'hb', 'htm', 'html', 'js', 'less', 'markdown', 'md', 'ms', 'mustache', 'php', 'rb', 'rdoc', 'sass', 'scss', 'slim', 'txt', 'xhtml', 'xml' ] + +# The path to the directory where all generated files will be written to. This +# can be an absolute path starting with a slash, but it can also be path +# relative to the site directory. +output_dir: output + +# A list of index filenames, i.e. names of files that will be served by a web +# server when a directory is requested. Usually, index files are named +# “index.html”, but depending on the web server, this may be something else, +# such as “default.htm”. This list is used by Nanoc to generate pretty URLs. +index_filenames: [ 'index.html' ] + +# Whether or not to generate a diff of the compiled content when compiling a +# site. The diff will contain the differences between the compiled content +# before and after the last site compilation. +enable_output_diff: false + +prune: + # Whether to automatically remove files not managed by Nanoc from the output + # directory. + auto_prune: true + + # Which files and directories you want to exclude from pruning. If you version + # your output directory, you should probably exclude VCS directories such as + # .git, .svn etc. + exclude: [ '.git', '.hg', '.svn', 'CVS' ] + +# The data sources where Nanoc loads its data from. This is an array of +# hashes; each array element represents a single data source. By default, +# there is only a single data source that reads data from the “content/” and +# “layout/” directories in the site directory. +data_sources: + - + # The type is the identifier of the data source. + type: filesystem + + # The path where items should be mounted (comparable to mount points in + # Unix-like systems). This is “/” by default, meaning that items will have + # “/” prefixed to their identifiers. If the items root were “/en/” + # instead, an item at content/about.html would have an identifier of + # “/en/about/” instead of just “/about/”. + items_root: / + + # The path where layouts should be mounted. The layouts root behaves the + # same as the items root, but applies to layouts rather than items. + layouts_root: / + + # The encoding to use for input files. If your input files are not in + # UTF-8 (which they should be!), change this. + encoding: utf-8 + + # The kind of identifier to use for items and layouts. The default is + # “full”, meaning that identifiers include file extensions. This can also + # be “legacy”, primarily used by older Nanoc sites. + identifier_type: full + +# Configuration for the “check” command, which run unit tests on the site. +checks: + # Configuration for the “internal_links” checker, which checks whether all + # internal links are valid. + internal_links: + # A list of patterns, specified as regular expressions, to exclude from the check. + # If an internal link matches this pattern, the validity check will be skipped. + # E.g.: + # exclude: ['^/server_status'] + exclude: [] + + # Configuration for the “external_links” checker, which checks whether all + # external links are valid. + external_links: + # A list of patterns, specified as regular expressions, to exclude from the check. + # If an external link matches this pattern, the validity check will be skipped. + # E.g.: + # exclude: ['^http://example.com$'] + exclude: [] + + # A list of file patterns, specified as regular expressions, to exclude from the check. + # If a file matches this pattern, the links from this file will not be checked. + # E.g.: + # exclude_files: ['blog/page'] + exclude_files: [] |