Giter Club home page Giter Club logo

dash-website's Introduction

Dash Website

Jekyll

We are using Jekyll to generate the static html files. https://jekyllrb.com

Requirements (mac)

Dependencies

(If you have nvm, do nvm install && nvm use first.)

Simply run npm install to install all dependencies. This will also run bundle install on postinstall to install all ruby gems.

CI Note: The Gems must also be installed on the CI server.

Mac Note: Bundler will try to install the dependency nokogiri. If you are using a Mac, and run into issues related to nokogiri during bundle install, do the following:

xcode-select --install

gem install nokogiri

Then run bundle install

Plugins

(If you still have a _plugins/jekyll-multiple-languages-plugin directory in your root folder, you will need to remove it.)

Development

npm start or npm run watch to build to the _site directory whenever a file is changed and serve via localhost:3000

Production Build

Production builds should be handled by CI.

npm run build will build a fully minified, mangled, and compressed build to the _site directory.

npm run htmlproof will run ImageCheck, ScriptCheck, and LinkCheck on the built "_site" folder "*.html" files. Travis CI will not deploy unless this command finishes successfully!

Mac xcode-select --install gem install nokogiri

i18n

Language variables are set in /_i18n/*.yml files. The master language file is /_i18n/en.yml. All other languages should use that file as a base.

Writing Content

Almost all of the content is defined as a variable in the /_i18n/*.yml files. There will be a separate yml file for each language that is supported. The master

Content should be written with little to no html. Do not wrap the content in <p></p> tags. If you need separate paragraphs, use two line breaks. For example:

Paragraph one


Paragraph two

Will render as:

<p>Paragraph one</p>
<p>Paragraph two</p>

Displaying Content

Strings

To output a variable to a template use: {% t key %} or {% translate key %}

Markdown

To output a variable to a template as markdown use: {% tmd key %} or {% translatemd key %}

Files

i18n files can be saved in their corresponding directories under /_i18n/

To include a file use: {% tf pagename/blockname.md %} or {% translate_file pagename/blockname.md %}

Writing a Blog Post

Blog posts can be written in MarkDown (.md) or HTML (.html).

Posts need to be saved in the _posts directory and the filename must always start with YYYY-MM-DD-

For example: 2016-05-12-new-website.md

###Front matter The top page of every post should contain the following (Example):

author: perry
layout: post
image: /assets/images/2016/05/Node40-banner.jpg
title: New website for Node40
description: Check out the new website for Node40

###Blog Post Images Image paths for blogs are currently relative to /assets/img/blog by default. If we replaced the image path from the front matter above with:

	image: MyImage.jpg

... will look for "MyImage.jpg" in the /assets/img/blog folder.

dash-website's People

Contributors

tungfa avatar mrleewong avatar perrywoodin avatar 0xfffxfff avatar andyfreer avatar seigler avatar nmarley avatar moocowmoo avatar hunterlester avatar vitaliytr avatar fernandogutie avatar alex-werner avatar chuckwilliams37 avatar schinzelh avatar udjinm6 avatar v2nek avatar robertoazar avatar thelazier avatar darbon avatar kiralybalazs avatar

Watchers

James Cloos 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.