/search-gov-website

This is the code for the Search.gov documentation website.

Primary LanguageSCSSCreative Commons Zero v1.0 UniversalCC0-1.0

search.gov

CircleCI

How to add a new post

  1. Clone the master branch.
  2. Create a new file in the drafts directory using the following naming convention: YYYY-MM-DD-post-filename-title.md
  3. Add the YAML block to the top of the file. You can use the following sample file as a starting point.
  4. Add the content of your new post below the YAML block. Feel free to use HTML, Markdown or Liquid Extension.
  5. Add, commit and push your new post back to the repository.
  6. After roughly 3 minutes, visit {{ site.baseurl }}/drafts/post-filename-title.html to preview your post. If you added a permalink config in your post, visit {{ site.baseurl }}/drafts/your-permalink.html
  7. When you're ready to publish your post, move the file from from drafts to the _posts directory.

How to set up your development environment

Open a Terminal window. Start homebrew.

$ brew update
$ brew doctor

We use bundler to manage gems. cd into the local repo. Install bundler and other required gems.

$ gem install bundler
$ bundle install

Running the site locally

To build the pages with Jekyll:

  1. open a new tab in terminal
  2. Navigate to the root directory of the project
  3. run: bundle exec jekyll serve
  4. Go to http://localhost:4000. The site should have the expected content & formatting of the [Search.gov]({{ site.baseurl }}/) homepage.

To build the CSS styles:

  1. open a new tab in terminal
  2. Navigate to the root directory of the project
  3. run: gulp
  4. Go to http://localhost:4000. The site should have the expected content & formatting of the [Search.gov]({{ site.baseurl }}/) homepage.

Template Images

To reference images in the the site templates, use the path to the image within the /assets/img folder.

{{ "/assets/img/site/searchdotgovlogo.png" | prepend: site.baseurl }}
  • For more information about Jekyll, visit the wiki pages.

  • If you don't already have it, you'll need the Ruby version specified in .ruby-version. RVM is recommended to install Ruby on your development environment. Verify that your path points to the correct version of Ruby:

    $ ruby -v ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-darwin18]