From 881aa082c63c025fcf2e48f018b66e70b23f9594 Mon Sep 17 00:00:00 2001 From: Jon Schlinkert Date: Wed, 5 Feb 2014 04:40:14 -0500 Subject: [PATCH] a number of updates to styles, data and docs --- CONTRIBUTING.md | 4 +-- Gruntfile.js | 6 ++-- LICENSE-MIT | 2 +- README.md | 2 +- _config.yml | 38 ++++++++++++++++++------ data/less.json | 8 ++--- data/translations.yml | 1 + package.json | 6 +--- styles/docs.css | 24 --------------- styles/site.less | 7 +++++ styles/variables.less | 4 +-- templates/functions.hbs | 47 ++++++++++++++++++------------ templates/helpers/sidenav.js | 5 ++-- templates/includes/head.hbs | 2 +- templates/includes/nav-main.hbs | 2 +- templates/includes/source-link.hbs | 2 +- 16 files changed, 85 insertions(+), 75 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 749c70c8..737b65f3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,8 @@ -## Contributing to the Wiki +## Contributing to the Documentation **Formatting Standards** -For consistency across all examples in the wiki and to ensure that our code examples are readable, we ask that you please follow these guidelines when contributing to the wiki: +For consistency across all examples in the docs and to ensure that our code examples are readable, please follow these guidelines when contributing: * Four spaces for indentation, and always use proper indentation * Multiple-line formatting (one property and value per line) diff --git a/Gruntfile.js b/Gruntfile.js index 2de9cdeb..eb67b1e7 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -14,7 +14,7 @@ module.exports = function(grunt) { grunt.initConfig({ // Project metadata - pkg : grunt.file.readJSON('package.json'), + pkg: grunt.file.readJSON('package.json'), site: grunt.file.readYAML('_config.yml'), jshint: { @@ -69,9 +69,9 @@ module.exports = function(grunt) { site: { options: { partials: ['content/**/*.md'], - permalinks: {preset: 'pretty'} + // permalinks: {preset: 'pretty'} }, - src: '<%= site.pages %>/*.hbs', + src: '<%= site.pages %>/functions.hbs', dest: '<%= site.dest %>/' }, feed: { diff --git a/LICENSE-MIT b/LICENSE-MIT index 4739f8d0..82be6e8d 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,4 +1,4 @@ -Copyright (c) 2013 Jon Schlinkert +Copyright (c) 2014 Alexis Sellier, LESS Core Team, Contributors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/README.md b/README.md index 6da8326a..404de80d 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ node data/utils/pkg && grunt ``` ## License -Copyright (c) 2013, Less.js Core Team, Contributors +Copyright (c) 2014, Alexis Sellier, LESS Core Team, Contributors Documentation released under [Creative Commons](./LICENSE-CC). Documentation source code released under the [MIT License](./LICENSE-MIT). Less.js source code is released under the [Apache 2 License](https://github.com/less/less.js/blob/master/LICENSE). diff --git a/_config.yml b/_config.yml index 714dd1b7..e0e2135b 100644 --- a/_config.yml +++ b/_config.yml @@ -19,15 +19,25 @@ layouts: <%= site.templates %>/layouts layoutext: .hbs layout: default -# Extensions +# Styles +styles: styles +components: <%= site.styles %>/components + + +# ============================================= +# EXTENSIONS +# ============================================= + helpers: <%= site.templates %>/helpers plugins: # - assemble-contrib-permalinks # - assemble-contrib-anchors # - assemble-contrib-toc -# Less.js metadata -current_version: <%= less.version %> + +# ============================================= +# PROJECT METADATA +# ============================================= # Site metadata brand: lesscss.org @@ -41,23 +51,33 @@ description: > homepage: http://lesscss.org repo: <%= pkg.repository.url %> issues: <%= pkg.bugs.url %>?&state=open + +# Download links download: source: <%= pkg.homepages %>/archive/master.zip latest: https://raw.github.com/less/less.js/master/dist/less-<%= less.version %>.min.js -cdn: - cloudflare: //cdnjs.cloudflare.com/ajax/libs/less.js/1.5.0/less.min.js +# ============================================= # SEO/SEM +# ============================================= + analytics: alexa: lpTeh1awA400OE - google: false - google_site_id: false + google: + id: UA-XXXXXXXX-YY + domain: lesscss.org + siteid: + tags: FOO-012345 # Google Tags (see: https://www.google.com/tagmanager/) +# ============================================= +# SOCIAL / SHARING +# ============================================= + # Comments disqus: - enabled: true + enabled: false shortname: <%= pkg.name %> # Social @@ -77,4 +97,4 @@ sharing: facebook: false gplus: false hn: false - google: false \ No newline at end of file + google: false diff --git a/data/less.json b/data/less.json index e94588af..6902f49b 100644 --- a/data/less.json +++ b/data/less.json @@ -1,7 +1,4 @@ { - "repo": "https://github.com/less/less.js.git", - "issues": "https://github.com/less/less.js/issues", - "master": "https://github.com/less/less.js/blob/master/", "name": "less", "version": "1.6.1", "description": "Leaner CSS", @@ -87,5 +84,8 @@ "stylesheet", "variables in css", "css less" - ] + ], + "repo": "https://github.com/less/less.js.git", + "issues": "https://github.com/less/less.js/issues", + "master": "https://github.com/less/less.js/blob/master/" } \ No newline at end of file diff --git a/data/translations.yml b/data/translations.yml index 84be63aa..2278e9f9 100644 --- a/data/translations.yml +++ b/data/translations.yml @@ -34,5 +34,6 @@ - language: Belarusian url: Out of date) {{/unpublished}} - +
-

String Functions

+ {{md 'string'}}
- +
-

Misc Functions

+ {{md 'misc'}} {{md 'default-function'}}
- +
-

List Functions

+ {{md 'list'}}
- +
-

Math Functions

+ {{md 'math'}}
- +
-

Type Functions

+ {{md 'type'}}
- + +
-
-

Color Definition

+

Color Definition

{{md 'color-definition'}}
-
-

Color Channel

+

Color Channel

{{md 'color-channel'}}
-
-

Color Operations

+

Color Operations

{{md 'color-operations'}}
-
-

Color Blending

+

Color Blending

{{md 'color-blending'}}
+ + diff --git a/templates/helpers/sidenav.js b/templates/helpers/sidenav.js index 81dc1d66..03a45d5c 100644 --- a/templates/helpers/sidenav.js +++ b/templates/helpers/sidenav.js @@ -8,7 +8,8 @@ // Node.js var path = require('path'); var _ = require('lodash'); -var yfm = require('yfm'); +var matter = require('gray-matter'); + // Export helpers module.exports.register = function (Handlebars, options, params) { @@ -30,7 +31,7 @@ module.exports.register = function (Handlebars, options, params) { // Process context, using YAML front-matter, // grunt config and Assemble options.data - var pageObj = yfm(filepath) || {}; + var pageObj = matter.read(filepath) || {}; var metadata = pageObj.context || {}; context = _.extend(this, opts.data[page.sidenav], metadata, context); diff --git a/templates/includes/head.hbs b/templates/includes/head.hbs index e27b086e..6183d426 100644 --- a/templates/includes/head.hbs +++ b/templates/includes/head.hbs @@ -28,7 +28,7 @@