Giter VIP home page Giter VIP logo

docs-layout-repo's Introduction

docs-layout-repo

This is the centralized layout repository for Pivotal documentation, for use with Bookbinder.

This repository is intended to contain layouts, formatting, and styles used across all (or most) documentation sets.

Note: Content specific to a book should be stored in the book, and not in this repo. For example, all subnav templates for the documentation set published by the docs-book-pcfservices book should be stored in the docs-book-pcfservices repository.

To include this centralized layout repository in your book, add the following line to your book's config.yml:

layout_repo: pivotal-cf/docs-layout-repo

Note: You must clone this repo in order to bind locally.

Upon running bind or watch, all files from the layout repo will be used in the bound book.

Overview

All book-specific overrides should be done in the following files in your book's master_middleman/source directory, according to the type of changes you would like to make.

Upon running bind or watch, all files from the layout repo will be used in the bound book.

Styles

Overrides are held in two files:

  • stylesheets/book-styles.css.scss

    Redefining or adding entire styles (classes, elements, etc.)

  • stylesheets/partials/_book-base-values.scss

    Redefining or adding base values, such as specific colors, fonts, or sizes.

    E.g.,

     $navy: #333333;
    
  • stylesheets/partials/_book-vars.scss

    Redefining or adding variables that point to the variable-ized base values in _vars.scss (under "BEGIN BASE VALUES") or _book-base-values.scss (as in the above example).

    E.g.,

     $color-bg: $navy;
    

Javascript

Overrides are held in javascripts/book.js.

If any additional libraries are to be added to the book (e.g. my-javascript-file.js), include them in the javascripts folder and then require them in this file, as follows:

\\= require 'my-javascript-file'

Layout

The Pivotal and Cloud Foundry books all use the layout repo's layout layouts/layout.erb. They define partials and template variables to change the layout contents where needed.

The following items are defined by books, and used by layouts/layout.erb:

Template variables:
  • cse_id: Google Custom Search Engine ID
  • support_link: Generic text (e.g. "Support") linking to support site
  • support_call_to_action: Call to action text (e.g. "Need Support?") linking to support site
  • product_link: Generic text (e.g. "Pivotal Web Services") linking to product site
  • ga_account_id: Google Analytics account ID
  • domain_name: Domain name for the book (used to scope the Google Custom Search)
  • book_title_short: Used in page's title (on browser tab)
Partials:
  • layouts/_book-title.erb: On home page, how the title and logo are displayed
  • layouts/_book-footer.erb: Copyright and support information in footer
  • layouts/_book-search.erb [Optional]: Google Custom Search Engine box

docs-layout-repo's People

Contributors

animatedmax avatar seviet avatar mlimonczenko avatar bentarnoff avatar ljarzynski avatar elenasharma avatar sarahwalther avatar mariantalla avatar jbheron avatar jacksoncvm avatar harxy avatar hanchennz avatar abbyachau avatar tinygrasshopper avatar pspinrad avatar mjgutermuth avatar semanticallynull avatar fifthposition avatar servicesenablement avatar cshollingsworth avatar davebarnes97 avatar ernst-riemer avatar jtarchie avatar radaeze avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.