►
From YouTube: Setting up the GitLab Handbook for Local Development
Description
Making handbook changes is sometimes easier to do when you have the immediate feedback of the local development environment. This tutorial shows you how you can get that set up on MacOS.
--------------------------------------
Handbook alias
alias handbook="cd ~/Documents/projects/www-gitlab-com/sites/handbook && code . && open http://localhost:4567 && bundle install && bundle exec middleman"
A
All
right
hi
everyone
today,
I
want
to
go
through
running
the
gitlab
handbook
locally
on
your
macbook
and
making
edits
to
the
page
locally
having
it
live
reload
when
you
make
those
changes
and
just
make
the
whole
handbook
editing
experience
a
lot
nicer
for
everyone.
A
So
basically
we
can
do
this
by
by
following
some
of
the
tutorials
in
the
handbook
documentation
in
on
gitlab
to
set
this
up
locally.
It
is
a
little
bit
challenging,
which
is
why
I'm
making
this
video.
So
hopefully
this
helps
you
get
up
and
running.
A
Www.Gitlab.Com,
so
this
is
a
fresh
installation
of
mac
os
it's
running
in
a
virtual
machine,
so
it's
a
little
bit
slower,
but
basically,
if
you
just
got
your
macbook,
you
know
this
is
what
it's
going
to
look
like,
even
if
you
haven't
really
changed
that
much
and
you've
been
using
it
for
a
while.
It
should
look
pretty
similar
to
this
so
yeah.
A
First,
we
go
to
the
the
handbook,
repo
www.gitlab.com,
so
in
here
we
actually
have
the
the
main
readme
and
there
is
a
section
on
local
development
which
we're
going
to
follow
so
we'll
open
that
up
in
its
own
tab.
So
we
have
it
there
available
for
us.
A
A
A
A
It's
just
that
for
security
purposes.
It
doesn't
show
you
exactly
what
you're
typing
or
it
doesn't
show
you
even
the
dots
so
that
people
that
you
know
don't
know
that
it's
that's
the
length
of
your
password,
so
you
just
have
to
enter
your
password
in
it's
going
to
ask
you
to
press
return
to
continue,
so
you
can
just
press
return
and
then
you'll
have
to
wait
for
this.
To
finish,.
A
Okay,
so
that
step
is
now
done.
I
did
pause
the
recording
there
because
it
takes
quite
a
while.
I
actually
had
to
cancel
mine
and
restart
it
because
it
seemed
like
the
internet
connection
was
a
bit
spotty
so,
second
time
around
it
was.
It
was
a
lot
faster,
but
yeah.
If
you
have
any
issues
you
know
that
might
take.
You
know
15
minutes
to
download.
If
you,
if
you've
got
a
slow
internet
connection,
it
should
be
around
five
minutes
or
less
for
most
people.
A
So
first
we're
going
to
actually
create
a
file
which
is
going
to
make
step
2
a
little
bit
easier,
so
we're
just
going
to
in
our
terminal
type
the
following
and
touch
and
then
tilde
forward,
slash,
dot,
h,
r
c,
okay
and
the
tilde
symbol
is
to
the
left
of
your
one
key
in
the
top
left
of
your
keyboard,
underneath
the
escape
key.
If
you
can't
find
it
so
we'll
just
do
that.
A
A
A
A
A
Let's,
let's
just
quickly
go
and
put
it
in
a
nice
place,
so
right
now
we're
in
the
home
directory
for
my
user.
What
we
want
to
do
is
we
want
to
find
a
nice
location
to
put
this
repository
on
our
local
system,
so
I'm
going
to
do
cd
documents
and
then,
in
this
directory,
I'm
going
to
create
a
directory
called
projects.
So
I'm
going
to
do
mkdir
which
stands
for
make
directory
projects.
A
A
Okay!
So
then,
within
this
directory,
I'm
going
to
create
this
gitlab
handbook
project,
so
we're
going
to
use
the
git
cli
here
to
do
this.
So
let
me
just
check
that
it's
installed
first
yep,
so
we've
got
git
there,
so
we
can
just
do
git
clone
and
then
we
can
paste
the
url
that
we
got
from
from
copying
it
from
here.
A
Okay,
so
if
I
just
press
enter
there,
it's
going
to
go
ahead
and
download
all
of
that
direct
all
of
that
repository
into
this
new
directory
that
that
we've
created
called
projects.
So
I'm
probably
going
to
stop
the
video
here,
because
it's
quite
a
large
project
and
then
I'll
start
up
when
it's
done.
A
Okay,
so
that
step
is
done
now
that
one
was
pretty
long.
It's
a
4.26
gigabyte
repository
so
yeah.
It
took
probably
around
10
minutes
or
so
to
download.
A
So
now
we're
going
to
run
the
last
bit
of
step
2
here,
nvm
install
on
nvmuse,
but
first
we
have
to
make
sure
that
we're
in
the
correct
directory
so
because
we
downloaded
our
our
handbook
project
before
we
just
have
to
make
sure
that
we
go
to
that
directory.
So
I'm
going
to
go
cd,
tilde
documents,
projects.
A
A
Install
that
might
take
a
few
seconds
just
to
download
the
correct
dependencies
there.
A
A
A
There
we
go
it's
done,
let's
just
make
sure
that
it's
available
so
yarn,
v,
okay,
so
that
gives
us
the
version.
If
you
get
an
error
here,
that
means
that
it
probably
didn't
succeed
in
installing
installing
properly
that's
okay,
just
make
sure
you've
done
all
the
steps
that
I've
shown
here.
Just
try
it
again
and
see
if
it
works
a
second
time.
A
Okay
and
that's
all-
we
have
to
do
for
step
three
so
step
four
rb,
and
so
let's
open
up
the
rbn
website
here,
just
have
to
scroll
down
we'll
just
click
on
installation
here,
so
we're
using
homebrew
on
mac
os
okay.
So
we
can
just
again
copy
this
step.
One
code
here,
I'm
just
going
to
clear
this
again
paste.
A
A
A
A
A
Basically,
use
this
script
here
or
this
command
here,
rb
amp
install
to
install
the
ruby
versions
that
we
want,
but
I'm
not
going
to
run
it
on
its
own,
like
that,
I'm
going
to
go
back
here
and
we're
going
to
follow
the
instructions
here.
So
it
says,
do
not
use
a
system
ruby!
That's
fine!
We've
already
installed
ibm,
so
we
can
set
up
our
our
ruby
version
as
per
what
the
gitlab.com
or
www
dash
to
get
labcom
project
tells
us,
so
we
can
basically
copy
this.
A
All
right,
so
that's
done
now.
I
took
a
little
while
so
I
did
pause
the
video
again
but
yeah
that
should
have
installed
our
version
as
of
today
version
2.6.5,
but
whenever
you
run
it
it'll,
it
should
just
install
the
version.
That's
current
for
the
the
handbook.
A
So
next
thing
we
probably
want
to
run
is
this
here.
Alternatively,
you
can
just
close
and
reopen
your
your
terminal,
but
we'll
run
this
one
just
because
it's
a
bit
quicker,
okay
and
then
we
need
to
do
the
the
last
little
step
here.
So
they're
asking
us
to
have
a
look
in
the
dot
ruby
version
file
to
see
what
the
version
is.
B
A
A
Okay,
that
one
was
a
little
bit
quicker
than
what
I
thought
it
would
be,
but
that's
all
we
have
to
run
for
step
six.
Okay,
let's
do
step
seven
here,
so
I'm
not
going
to
use
the
first
command
here.
I
think
we're
going
to
use
the
pi
end
instead,
just
because
it's
going
to
be
a
little
bit,
give
us
a
bit
more
assurance
that
we're
on
the
right
version
of
python.
So
I'm
going
to
start
with
this
brew.
Install
payment
command
here,
paste
that
in
the
terminal
run.
B
A
A
A
A
All
right,
so
we're
done
with
the
main
prerequisite
step
here
that
we
had
to
set
up
so
now
we're
in
the
the
sort
of
steps
around
running
the
actual
handbook,
so
we're
going
to
use
a
a
a
library
called
middleman,
which
is
a
ruby
library.
So
we'll
just
follow
these
steps
here.
A
It
actually
tells
you
here
that
if
you're
only
using
the
handbook,
then
you
can
just
go
to
the
site's
handbook
directory,
which
I
definitely
recommend
it's
a
lot
quicker,
so
we'll
have
to
make
sure
that
we're
back
in
our
repositories.
So
let's
do
cd,
tilde
documents,
projects
www.kitlab.com!
A
A
A
Okay,
so
when
you
see
this
http
message
here,
that
means
that
it's
done
so.
The
next
step
is
to
actually
run
this,
but
I'm
actually
going
to
change
this
a
little
bit
because
we
don't
ever
want
the
contracts
to
be
checked.
So
I'm
gonna
get
you
to
change
your
zs
hrc
file
again
to
add
this
line.
So
let's
just
do
echo
single
quote:
export
no
underscore
contracts
equals
true
and
single
quote
and
we'll
do
the
double
arrow
again
into
tilde
forward,
slash
dot,
zs
hrc.
B
A
A
So
this
is
something
you'd
run
again
within
the
handbook,
site's
handbook
directory,
and
this
will
actually
run
the
handbook
for
local
development.
So
this
is
our
last
step.
Basically,
so
we'll
just
wait
for
that
to
load.
It
takes
a
little
bit
of
time,
probably
about
two
or
three
minutes
before
it
actually
starts
the
web
server.
So
we'll
just
wait
for
that
to
happen
now.
A
Okay,
so
it
is
actually
listening
now
for
requests
to
our
local
host,
but
we're
still
waiting
for
the
the
build
to
complete.
So
we'll
just
wait
a
little
bit
longer.
A
Okay,
so
as
one
little
final
step
to
this
whole
process,
we're
going
to
download
visual
studio
code
because
you
can
use
the
visual
studio
code
to
edit
the
handbook
locally.
And
we.
A
B
A
And
then,
once
it's
open
here,
you
want
to
basically
do
command
shift
p,
which
will
open
up
this
little
thing
with
the
arrow
here
and
then
you
can
just
type
code
and
then
look
for
the
one
that
says:
shell
command,
install
code
command
in
path.
So
you
want
to
click
on
that
one,
and
then
it
should
say
that
it
successfully
installed
code
to
your
path.
So
what
that
will?
Basically
let
us
do
is
in
our
terminal.
A
We
can
go
to
any
directory
on
our
system.
So
if
I,
for
example,
go
to
my
directory
that
I
have
the
handbook
in
this
one,
I
can
do
code
and
then
just
full
stop
and
that
will
open
up
visual
studio
code
to
that
location
there.
So
that's
pretty
handy
and
we're
actually
going
to
use
that
now
to
set
up
some
helpful,
helpful
command
aliases
here
in
the
terminal
that
will
make
working
with
the
handbook
a
little
bit
easier.
A
And
after
that
I
want
to
open
my
browser
to
the
correct
url
for
the
handbook,
and
then
I
want
to
run
bundle
install
which
will
install
all
the
latest
dependencies
for
the
handbook
and
then
finally,
I
want
to
actually
run
the
handbook
itself.
So
this
is
pretty
handy.
You'll
see
once
you've
got
that
you
can
run
source
dot,
tilde
support,
dot,
zs
hrc
and
then
from
here
you
can
just
basically
run
the
command
handbook
and
that
will
do
all
the
things
that
we
configured
it
to
do
in
that
file.
So
it's.
B
A
Up
my
visual
studio
code
to
the
correct
location
in
the
handbook,
yeah
so
handbook
source,
handbook,
okay
and
then
it's
open
up
my
browser
to
localhost
4567,
which
is
where
the
handbook
is
hosted
and
then,
if
we
open
the
terminal
again,
you'll
actually
see
that
it
ran
the
handbook
here.
So
you
want
to
wait
until
you
get
this
prompt
here.
That
tells
you
to
view
your
site
and
you
can
use
any
of
your
any
of
the
urls
that
it
recommends
here.
So
we
can
either
use
this
one.
A
This
will
dynamically
update
depending
on
the
name
of
your
computer,
or
you
can
use
the
one
with
the
specific
ip
address
or
you
can
just
use
localhost
like
we've
been
doing
localhost
colin4567
and,
as
you
can
see,
it's
loaded
the
handbook
here
and
yeah.
That's
basically
it
for
that
last
step,
just
a
really
handy
command
that
we
can
use
to
to
basically
run
this
quickly
and
easily
at
any
time
without
having
to
run
all
those
other
commands
and
remember
them
as
well.
So
this
way
you
only
have
to
remember
the
one
command.