Commit e0fb0703 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'features/help_with_index'

parents e982a951 2be107d0
...@@ -81,6 +81,8 @@ ...@@ -81,6 +81,8 @@
} }
} }
} }
&.nav-small-tabs > li > a { padding: 6px 9px; }
} }
/** ALERT MESSAGES **/ /** ALERT MESSAGES **/
......
.row
.span3{:"data-spy" => 'affix'}
.ui-box
.title
%h5 Help
%ul.well-list
%li
%strong= link_to "Workflow", help_workflow_path
%li
%strong= link_to "SSH keys", help_ssh_path
%li
%strong= link_to "GitLab Markdown", help_markdown_path
%li
%strong= link_to "Permissions", help_permissions_path
%li
%strong= link_to "API", help_api_path
%li
%strong= link_to "Web Hooks", help_web_hooks_path
%li
%strong= link_to "Rake Tasks", help_raketasks_path
%li
%strong= link_to "System Hooks", help_system_hooks_path
%li
%strong= link_to "Public Access", help_public_access_path
.span9.right
= yield
%h3.page_title API = render layout: 'help/layout' do
.back_link %h3.page_title API
= link_to help_path do %br
← to index
%br
%ul.nav.nav-tabs.log-tabs %ul.nav.nav-tabs.log-tabs.nav-small-tabs
%li.active %li.active
= link_to "README", "#README", 'data-toggle' => 'tab' = link_to "README", "#README", 'data-toggle' => 'tab'
%li %li
= link_to "Projects", "#projects", 'data-toggle' => 'tab' = link_to "Projects", "#projects", 'data-toggle' => 'tab'
%li %li
= link_to "Snippets", "#snippets", 'data-toggle' => 'tab' = link_to "Snippets", "#snippets", 'data-toggle' => 'tab'
%li %li
= link_to "Repositories", "#repositories", 'data-toggle' => 'tab' = link_to "Repositories", "#repositories", 'data-toggle' => 'tab'
%li %li
= link_to "Users", "#users", 'data-toggle' => 'tab' = link_to "Users", "#users", 'data-toggle' => 'tab'
%li %li
= link_to "Session", "#session", 'data-toggle' => 'tab' = link_to "Session", "#session", 'data-toggle' => 'tab'
%li %li
= link_to "Issues", "#issues", 'data-toggle' => 'tab' = link_to "Issues", "#issues", 'data-toggle' => 'tab'
%li %li
= link_to "Milestones", "#milestones", 'data-toggle' => 'tab' = link_to "Milestones", "#milestones", 'data-toggle' => 'tab'
%li %li
= link_to "Notes", "#notes", 'data-toggle' => 'tab' = link_to "Notes", "#notes", 'data-toggle' => 'tab'
.tab-content .tab-content
.tab-pane.active#README .tab-pane.active#README
.file_holder .file_holder
.file_title .file_title
%i.icon-file %i.icon-file
README README
.file_content.wiki .file_content.wiki
= preserve do = preserve do
= markdown File.read(Rails.root.join("doc", "api", "README.md")) = markdown File.read(Rails.root.join("doc", "api", "README.md"))
.tab-pane#projects .tab-pane#projects
.file_holder .file_holder
.file_title .file_title
%i.icon-file %i.icon-file
Projects Projects
.file_content.wiki .file_content.wiki
= preserve do = preserve do
= markdown File.read(Rails.root.join("doc", "api", "projects.md")) = markdown File.read(Rails.root.join("doc", "api", "projects.md"))
.tab-pane#snippets .tab-pane#snippets
.file_holder .file_holder
.file_title .file_title
%i.icon-file %i.icon-file
Projects Snippets Projects Snippets
.file_content.wiki .file_content.wiki
= preserve do = preserve do
= markdown File.read(Rails.root.join("doc", "api", "snippets.md")) = markdown File.read(Rails.root.join("doc", "api", "snippets.md"))
.tab-pane#repositories .tab-pane#repositories
.file_holder .file_holder
.file_title .file_title
%i.icon-file %i.icon-file
Projects Projects
.file_content.wiki .file_content.wiki
= preserve do = preserve do
= markdown File.read(Rails.root.join("doc", "api", "repositories.md")) = markdown File.read(Rails.root.join("doc", "api", "repositories.md"))
.tab-pane#users .tab-pane#users
.file_holder .file_holder
.file_title .file_title
%i.icon-file %i.icon-file
Users Users
.file_content.wiki .file_content.wiki
= preserve do = preserve do
= markdown File.read(Rails.root.join("doc", "api", "users.md")) = markdown File.read(Rails.root.join("doc", "api", "users.md"))
.tab-pane#session .tab-pane#session
.file_holder .file_holder
.file_title .file_title
%i.icon-file %i.icon-file
Session Session
.file_content.wiki .file_content.wiki
= preserve do = preserve do
= markdown File.read(Rails.root.join("doc", "api", "session.md")) = markdown File.read(Rails.root.join("doc", "api", "session.md"))
.tab-pane#issues .tab-pane#issues
.file_holder .file_holder
.file_title .file_title
%i.icon-file %i.icon-file
Issues Issues
.file_content.wiki .file_content.wiki
= preserve do = preserve do
= markdown File.read(Rails.root.join("doc", "api", "issues.md")) = markdown File.read(Rails.root.join("doc", "api", "issues.md"))
.tab-pane#milestones .tab-pane#milestones
.file_holder .file_holder
.file_title .file_title
%i.icon-file %i.icon-file
Milestones Milestones
.file_content.wiki .file_content.wiki
= preserve do = preserve do
= markdown File.read(Rails.root.join("doc", "api", "milestones.md")) = markdown File.read(Rails.root.join("doc", "api", "milestones.md"))
.tab-pane#notes .tab-pane#notes
.file_holder .file_holder
.file_title .file_title
%i.icon-file %i.icon-file
Notes Notes
.file_content.wiki .file_content.wiki
= preserve do = preserve do
= markdown File.read(Rails.root.join("doc", "api", "notes.md")) = markdown File.read(Rails.root.join("doc", "api", "notes.md"))
%h3.page_title GitLab Flavored Markdown = render layout: 'help/layout' do
.back_link %h3.page_title GitLab Flavored Markdown
= link_to help_path do %br
← to index
%hr .row
.span8
.row
.span8
%p
For GitLab we developed something we call "GitLab Flavored Markdown" (GFM).
It extends the standard Markdown in a few significant ways adds some useful functionality.
%p You can use GFM in:
%ul
%li commit messages
%li comments
%li wall posts
%li issues
%li merge requests
%li milestones
%li wiki pages
.span4
.alert.alert-info
%p %p
If you're not already familiar with Markdown, you should spend 15 minutes and go over the excellent For GitLab we developed something we call "GitLab Flavored Markdown" (GFM).
%strong= link_to "Markdown Syntax Guide", "http://daringfireball.net/projects/markdown/syntax" It extends the standard Markdown in a few significant ways adds some useful functionality.
at Daring Fireball.
%p You can use GFM in:
%ul
%li commit messages
%li comments
%li wall posts
%li issues
%li merge requests
%li milestones
%li wiki pages
.span4
.alert.alert-info
%p
If you're not already familiar with Markdown, you should spend 15 minutes and go over the excellent
%strong= link_to "Markdown Syntax Guide", "http://daringfireball.net/projects/markdown/syntax"
at Daring Fireball.
.row
.span8
%h3 Differences from traditional Markdown
%h4 Newlines
.row %p
.span8 The biggest difference that GFM introduces is in the handling of linebreaks.
%h3 Differences from traditional Markdown With traditional Markdown you can hard wrap paragraphs of text and they will be combined into a single paragraph. We find this to be the cause of a huge number of unintentional formatting errors.
GFM treats newlines in paragraph-like content as real line breaks, which is probably what you intended.
%h4 Newlines
%p %p The next paragraph contains two phrases separated by a single newline character:
The biggest difference that GFM introduces is in the handling of linebreaks. %pre= "Roses are red\nViolets are blue"
With traditional Markdown you can hard wrap paragraphs of text and they will be combined into a single paragraph. We find this to be the cause of a huge number of unintentional formatting errors. %p becomes
GFM treats newlines in paragraph-like content as real line breaks, which is probably what you intended. = markdown "Roses are red\nViolets are blue"
%h4 Multiple underscores in words
%p The next paragraph contains two phrases separated by a single newline character: %p
%pre= "Roses are red\nViolets are blue" It is not reasonable to italicize just <em>part</em> of a word, especially when you're dealing with code and names often appear with multiple underscores.
%p becomes Therefore, GFM ignores multiple underscores in words.
= markdown "Roses are red\nViolets are blue"
%h4 Multiple underscores in words %pre= "perform_complicated_task\ndo_this_and_do_that_and_another_thing"
%p becomes
= markdown "perform_complicated_task\ndo_this_and_do_that_and_another_thing"
%p %h4 URL autolinking
It is not reasonable to italicize just <em>part</em> of a word, especially when you're dealing with code and names often appear with multiple underscores.
Therefore, GFM ignores multiple underscores in words.
%pre= "perform_complicated_task\ndo_this_and_do_that_and_another_thing" %p
%p becomes GFM will autolink standard URLs you copy and paste into your text.
= markdown "perform_complicated_task\ndo_this_and_do_that_and_another_thing" So if you want to link to a URL (instead of a textual link), you can simply put the URL in verbatim and it will be turned into a link to that URL.
%h4 URL autolinking %h4 Fenced code blocks
%p %p
GFM will autolink standard URLs you copy and paste into your text. Markdown converts text with four spaces at the front of each line to code blocks.
So if you want to link to a URL (instead of a textual link), you can simply put the URL in verbatim and it will be turned into a link to that URL. GFM supports that, but we also support fenced blocks.
Just wrap your code blocks in <code>```</code> and you won't need to indent manually to trigger a code block.
%h4 Fenced code blocks %pre= %Q{```ruby\nrequire 'redcarpet'\nmarkdown = Redcarpet.new("Hello World!")\nputs markdown.to_html\n```}
%p becomes
= markdown %Q{```ruby\nrequire 'redcarpet'\nmarkdown = Redcarpet.new("Hello World!")\nputs markdown.to_html\n```}
%p %h4 Emoji
Markdown converts text with four spaces at the front of each line to code blocks.
GFM supports that, but we also support fenced blocks.
Just wrap your code blocks in <code>```</code> and you won't need to indent manually to trigger a code block.
%pre= %Q{```ruby\nrequire 'redcarpet'\nmarkdown = Redcarpet.new("Hello World!")\nputs markdown.to_html\n```} .row
%p becomes .span8
= markdown %Q{```ruby\nrequire 'redcarpet'\nmarkdown = Redcarpet.new("Hello World!")\nputs markdown.to_html\n```} :ruby
puts markdown %Q{Sometimes you want to be :cool: and add some :sparkles: to your :speech_balloon:. Well we have a :gift: for you:
%h4 Emoji :exclamation: You can use emoji anywhere GFM is supported. :sunglasses:
.row You can use it to point out a :bug: or warn about :monkey:patches. And if someone improves your really :snail: code, send them a :bouquet: or some :candy:. People will :heart: you for that.
.span8
:ruby
puts markdown %Q{Sometimes you want to be :cool: and add some :sparkles: to your :speech_balloon:. Well we have a :gift: for you:
:exclamation: You can use emoji anywhere GFM is supported. :sunglasses: If you are :new: to this, don't be :fearful:. You can easily join the emoji :circus_tent:. All you need to do is to :book: up on the supported codes.
}
You can use it to point out a :bug: or warn about :monkey:patches. And if someone improves your really :snail: code, send them a :bouquet: or some :candy:. People will :heart: you for that. .span4
.alert.alert-info
%p
Consult the
%strong= link_to "Emoji Cheat Sheet", "http://www.emoji-cheat-sheet.com/"
for a list of all supported emoji codes.
If you are :new: to this, don't be :fearful:. You can easily join the emoji :circus_tent:. All you need to do is to :book: up on the supported codes. .row
} .span8
%h4 Special GitLab references
.span4
.alert.alert-info
%p %p
Consult the GFM recognizes special references.
%strong= link_to "Emoji Cheat Sheet", "http://www.emoji-cheat-sheet.com/" You can easily reference e.g. a team member, an issue or a commit within a project.
for a list of all supported emoji codes. GFM will turn that reference into a link so you can navigate between them easily.
.row %p GFM will recognize the following references:
.span8 %ul
%h4 Special GitLab references %li
%code @foo
%p for team members
GFM recognizes special references. %li
You can easily reference e.g. a team member, an issue or a commit within a project. %code #123
GFM will turn that reference into a link so you can navigate between them easily. for issues
%li
%p GFM will recognize the following references: %code !123
%ul for merge request
%li %li
%code @foo %code $123
for team members for snippets
%li %li
%code #123 %code 1234567
for issues for commits
%li
%code !123 -# this example will only be shown if the user has a project with at least one issue
for merge request - if @project = current_user.authorized_projects.first
%li - if issue = @project.issues.first
%code $123 %p For example in your #{link_to @project.name, project_path(@project)} project, writing:
for snippets %pre= "This is related to ##{issue.id}. @#{current_user.name} is working on solving it."
%li %p becomes:
%code 1234567 = markdown "This is related to ##{issue.id}. @#{current_user.name} is working on solving it."
for commits - @project = nil # Prevent this from bubbling up to page title
-# this example will only be shown if the user has a project with at least one issue
- if @project = current_user.authorized_projects.first
- if issue = @project.issues.first
%p For example in your #{link_to @project.name, project_path(@project)} project, writing:
%pre= "This is related to ##{issue.id}. @#{current_user.name} is working on solving it."
%p becomes:
= markdown "This is related to ##{issue.id}. @#{current_user.name} is working on solving it."
- @project = nil # Prevent this from bubbling up to page title
%h3.page_title Permissions = render layout: 'help/layout' do
.back_link %h3.page_title Permissions
= link_to help_path do %br
&larr; to index
%hr
%fieldset %fieldset
%legend Guest %legend Guest
%ul %ul
%li Create new issue %li Create new issue
%li Leave comments %li Leave comments
%li Write on project wall %li Write on project wall
%fieldset %fieldset
%legend Reporter %legend Reporter
%ul %ul
%li Create new issue %li Create new issue
%li Leave comments %li Leave comments
%li Write on project wall %li Write on project wall
%li Pull project code %li Pull project code
%li Download project %li Download project
%li Create a code snippets %li Create a code snippets
%fieldset %fieldset
%legend Developer %legend Developer
%ul %ul
%li Create new issue %li Create new issue
%li Leave comments %li Leave comments
%li Write on project wall %li Write on project wall
%li Pull project code %li Pull project code
%li Download project %li Download project
%li Create new merge request %li Create new merge request
%li Create a code snippets %li Create a code snippets
%li Create new branches %li Create new branches
%li Push to non-protected branches %li Push to non-protected branches
%li Remove non-protected branches %li Remove non-protected branches
%li Add tags %li Add tags
%li Write a wiki %li Write a wiki
%fieldset %fieldset
%legend Master %legend Master
%ul %ul
%li Create new issue %li Create new issue
%li Leave comments %li Leave comments
%li Write on project wall %li Write on project wall
%li Pull project code %li Pull project code
%li Download project %li Download project
%li Create new merge request %li Create new merge request
%li Create a code snippets %li Create a code snippets
%li Create new branches %li Create new branches
%li Push to non-protected branches %li Push to non-protected branches
%li Remove non-protected branches %li Remove non-protected branches
%li Add tags %li Add tags
%li Write a wiki %li Write a wiki
%li Add new team members %li Add new team members
%li Push to protected branches %li Push to protected branches
%li Remove protected branches %li Remove protected branches
%li Push with force option %li Push with force option
%li Edit project %li Edit project
%li Add Deploy Keys to project %li Add Deploy Keys to project
%li Configure Project Hooks %li Configure Project Hooks
%fieldset %fieldset
%legend Owner %legend Owner
%ul %ul
%li Transfer project to another namespace %li Transfer project to another namespace
%li Remove project %li Remove project
%h3.page_title Public Access = render layout: 'help/layout' do
.back_link %h3.page_title Public Access
= link_to help_path do %br
&larr; to index
%hr
%p %p
GitLab allows you to open selected projects to be accessed publicly. GitLab allows you to open selected projects to be accessed publicly.
These projects will be clonable These projects will be clonable
%em without any %em without any
authentication. authentication.
Also they will be listed on the #{link_to "public access directory", public_root_path}. Also they will be listed on the #{link_to "public access directory", public_root_path}.
%ol %ol
%li Go to your project dashboard %li Go to your project dashboard
%li Click on the "Edit" tab %li Click on the "Edit" tab
%li Select "Public clone access" %li Select "Public clone access"
%h3.page_title GitLab Rake Tasks = render layout: 'help/layout' do
.back_link %h3.page_title GitLab Rake Tasks
= link_to help_path do %br
&larr; to index
%hr
%p.slead %p.slead
GitLab provides some specific rake tasks to enable special features or perform maintenance tasks. GitLab provides some specific rake tasks to enable special features or perform maintenance tasks.
%ul.nav.nav-tabs.log-tabs %ul.nav.nav-tabs.log-tabs
%li.active %li.active
= link_to "Features", "#features", 'data-toggle' => 'tab' = link_to "Features", "#features", 'data-toggle' => 'tab'
%li %li
= link_to "Maintenance", "#maintenance", 'data-toggle' => 'tab' = link_to "Maintenance", "#maintenance", 'data-toggle' => 'tab'
%li %li
= link_to "User Management", "#user_management", 'data-toggle' => 'tab' = link_to "User Management", "#user_management", 'data-toggle' => 'tab'
%li %li
= link_to "Backup & Restore", "#backup_restore", 'data-toggle' => 'tab' = link_to "Backup & Restore", "#backup_restore", 'data-toggle' => 'tab'
%li %li
= link_to "Cleanup", "#cleanup", 'data-toggle' => 'tab' = link_to "Cleanup", "#cleanup", 'data-toggle' => 'tab'
.tab-content .tab-content
.tab-pane.active#features .tab-pane.active#features
.file_holder .file_holder
.file_title .file_title
%i.icon-file %i.icon-file
Features Features
.file_content.wiki .file_content.wiki
= preserve do = preserve do
= markdown File.read(Rails.root.join("doc", "raketasks", "features.md")) = markdown File.read(Rails.root.join("doc", "raketasks", "features.md"))
.tab-pane#maintenance .tab-pane#maintenance
.file_holder .file_holder
.file_title .file_title
%i.icon-file %i.icon-file
Maintenance Maintenance
.file_content.wiki .file_content.wiki
= preserve do = preserve do
= markdown File.read(Rails.root.join("doc", "raketasks", "maintenance.md")) = markdown File.read(Rails.root.join("doc", "raketasks", "maintenance.md"))
.tab-pane#user_management .tab-pane#user_management
.file_holder .file_holder
.file_title .file_title
%i.icon-file %i.icon-file
User Management User Management
.file_content.wiki .file_content.wiki
= preserve do = preserve do
= markdown File.read(Rails.root.join("doc", "raketasks", "user_management.md")) = markdown File.read(Rails.root.join("doc", "raketasks", "user_management.md"))
.tab-pane#cleanup .tab-pane#cleanup
.file_holder .file_holder
.file_title .file_title
%i.icon-file %i.icon-file
Cleanup Cleanup
.file_content.wiki .file_content.wiki
= preserve do = preserve do
= markdown File.read(Rails.root.join("doc", "raketasks", "cleanup.md")) = markdown File.read(Rails.root.join("doc", "raketasks", "cleanup.md"))
.tab-pane#backup_restore .tab-pane#backup_restore
.file_holder .file_holder
.file_title .file_title
%i.icon-file %i.icon-file
Backup & Restore Backup & Restore
.file_content.wiki .file_content.wiki
= preserve do = preserve do
= markdown File.read(Rails.root.join("doc", "raketasks", "backup_restore.md")) = markdown File.read(Rails.root.join("doc", "raketasks", "backup_restore.md"))
%h3.page_title SSH Keys = render layout: 'help/layout' do
.back_link %h3.page_title SSH Keys
= link_to help_path do %br
&larr; to index
%hr
%p.slead %p.slead
SSH key allows you to establish a secure connection between your computer and GitLab SSH key allows you to establish a secure connection between your computer and GitLab
%p.slead %p.slead
To generate a new SSH key just open your terminal and use code below. To generate a new SSH key just open your terminal and use code below.
%pre.dark %pre.dark
ssh-keygen -t rsa -C "#{current_user.email}" ssh-keygen -t rsa -C "#{current_user.email}"
\# Creates a new ssh key using the provided email \# Creates a new ssh key using the provided email
\# Generating public/private rsa key pair... \# Generating public/private rsa key pair...
%p.slead %p.slead
Next just use code below to dump your public key and add to GitLab SSH Keys Next just use code below to dump your public key and add to GitLab SSH Keys
%pre.dark %pre.dark
cat ~/.ssh/id_rsa.pub cat ~/.ssh/id_rsa.pub
\# ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6eNtGpNGwstc.... \# ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6eNtGpNGwstc....
%h3 System hooks = render layout: 'help/layout' do
.back_link %h3.page_title System hooks
= link_to :back do
&larr; back
%hr
%p.slead
Your GitLab instance can perform HTTP POST requests on the following events: create_project, delete_project, create_user, delete_user, change_team_member.
%br
%br %br
System Hooks can be used, e.g. for logging or changing information in a LDAP server.
%br %p.slead
%h5 Hooks request example: Your GitLab instance can perform HTTP POST requests on the following events: create_project, delete_project, create_user, delete_user, change_team_member.
= render "admin/hooks/data_ex" %br
%br
System Hooks can be used, e.g. for logging or changing information in a LDAP server.
%br
%h5 Hooks request example:
= render "admin/hooks/data_ex"
%h3.page_title Web hooks = render layout: 'help/layout' do
.back_link %h3.page_title Web hooks
= link_to help_path do
&larr; to index
%hr
%p.slead
Every GitLab project can trigger a web server whenever the repo is pushed to.
%br
Web Hooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server.
%br %br
GitLab will send POST request with commits information on every push.
%h5 Hooks request example: %p.slead
= render "hooks/data_ex" Every GitLab project can trigger a web server whenever the repo is pushed to.
%br
Web Hooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server.
%br
GitLab will send POST request with commits information on every push.
%h5 Hooks request example:
= render "hooks/data_ex"
%h3.page_title Workflow = render layout: 'help/layout' do
.back_link %h3.page_title Workflow
= link_to help_path do %br
&larr; to index
%hr %ol.help
%li
%ol.help %p Clone project
%li .bash
%p Clone project %pre.dark
.bash git clone git@example.com:project-name.git
%pre.dark
git clone git@example.com:project-name.git %li
%p Create branch with your feature
%li .bash
%p Create branch with your feature %pre.dark
.bash git checkout -b $feature_name
%pre.dark
git checkout -b $feature_name %li
%p Write code. Commit changes
%li .bash
%p Write code. Commit changes %pre.dark
.bash git commit -am "My feature is ready"
%pre.dark
git commit -am "My feature is ready" %li
%p Push your branch to GitLab
%li .bash
%p Push your branch to GitLab %pre.dark
.bash git push origin $feature_name
%pre.dark
git push origin $feature_name %li
%p Review your code on Commits page
%li
%p Review your code on Commits page %li
%p Create a merge request
%li
%p Create a merge request %li
%p Your team lead will review code &amp; merge it to main branch
%li
%p Your team lead will review code &amp; merge it to main branch
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment