• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..25-Jul-2019-

assets/H03-May-2022-19,57818,504

data/H25-Jul-2019-287283

deploy/H25-Jul-2019-8758

source/H03-May-2022-77,95459,153

.ruby-versionH A D25-Jul-20196 21

GemfileH A D25-Jul-2019358 108

Gemfile.lockH A D25-Jul-20194.3 KiB194189

LICENSE.mdH A D25-Jul-2019381 117

MakefileH A D25-Jul-2019767 3127

README.mdH A D25-Jul-20194.6 KiB4930

bootstrap.shH A D25-Jul-2019204 76

config.rbH A D25-Jul-20192.8 KiB12183

README.md

1# Vault Website
2
3This subdirectory contains the entire source for the [Vault Website][vault].
4This is a [Middleman][middleman] project, which builds a static site from these
5source files.
6
7## Updating Navigation
8
9There are a couple different places on the website that present navigation interfaces with differing levels of detail.
10
11On the homepage, docs index page, and api docs index page, there are grids of major categories [that look like this](https://cl.ly/73df9722848d/Screen%20Shot%202018-11-09%20at%2011.40.56%20AM.png). These major category grids can be updated through [`data/docs_basic_categories.yml`](data/docs_basic_categories.yml) and [`data/api_basic_categories.yml`](data/api_basic_categories.yml).
12
13On the docs and api index pages, there are more detailed breakdowns of top-level documentation pages within each category [that look like this](https://cl.ly/b05cf42402eb/Screen%20Shot%202018-11-09%20at%2011.43.25%20AM.png). These more detailed category listings can be updated through [`data/docs_detailed_categories.yml`](data/docs_detailed_categories.yml) and [`data/api_detailed_categories.yml`](data/api_detailed_categories.yml).
14
15Finally, within a given docs page, there is a sidebar which displays a fully nested version of all docs pages. This sidebar navigation can be updated through via middleman's layouts, found at [`source/layouts/docs.erb`](source/layouts/docs.erb) and [`source/layouts/api.erb`](source/layouts/api.erb). You will see within these files that it is no longer necessary to type out full nested html list item and link tags, you can simply add the documentation page's slug, defined as `sidebar_current` within the frontmatter of any docs markdown file. The sidebar nav component will go find the page by slug and render out its human-readable title and a link for you. This component does not allow broken links or nesting mistakes, so if you make a typo on the slug or put a page in the wrong category, the build will fail.
16
17## Contributions Welcome!
18
19If you find a typo or you feel like you can improve the HTML, CSS, or
20JavaScript, we welcome contributions. Feel free to open issues or pull requests
21like any normal GitHub project, and we'll merge it in.
22
23## Running the Site Locally
24
25When running the site locally, you can choose between running it directly on your machine, or running it through Docker. Docker has the advantage of requiring only Docker to be installed - no other dependencies are needed on your machine. However, Docker's overhead makes the site's compilation perform much slower than running it directly on your machine. If you are a frequent contributor, are bothered by the performance in Docker, or have no issues with installing ruby and node / already have them installed, it might be an advantage to try running the site directly on your machine. Instructions for both approaches are included below.
26
27### Running the Site with Docker
28
29First, make sure that [docker](docker) is installed. It can be installed in many ways, [the desktop app](docker-desktop) is the simplest. To run the site, clone this repo down, `cd` into the `website` directory, and run `make website`. If it is your first time running the site, the build will take a little longer as it needs to download a docker image and a bunch of dependencies, so maybe go grab a coffee. On subsequent runs, it will be faster as dependencies are cached.
30
31### Running the Site Directly
32
33This site requires a recent version of ruby as well as nodejs to be installed in order to run. There are [many ways to install ruby](https://www.ruby-lang.org/en/documentation/installation/), we recommend [rbenv](rbenv), which has very clear installation instructions in its readme, linked here, and installing ruby version `2.4.3`. Once ruby has been installed, you will need to install `bundler` as well, using `gem install bundler`. Node is quite easy to install [via universal binary](node) or [homebrew](homebrew) if you are a mac user.
34
35Once ruby and node have been installed, within this directory, you can run `sh bootstrap.sh` to install all the dependencies needed to run the site, then run `middleman` to start the dev server.
36
37### Browsing the Site Locally
38
39Once you have the local dev server running, head to `http://localhost:4567` in your browser. Note that for some URLs, you may need to append
40".html" to make them work (in the navigation).
41
42[middleman]: https://www.middlemanapp.com
43[vault]: https://www.vaultproject.io
44[docker]: https://www.docker.com/
45[docker-desktop]: https://www.docker.com/products/docker-desktop
46[rbenv]: https://github.com/rbenv/rbenv#installation
47[node]: https://nodejs.org/en/
48[homebrew]: https://brew.sh/
49