diff --git a/.hound.yml b/.hound.yml deleted file mode 100644 index 06e84697..00000000 --- a/.hound.yml +++ /dev/null @@ -1,20 +0,0 @@ -fail_on_violations: true -javascript: - enabled: true - ignore_file: .hound/ignoredfiles -eslint: - enabled: true - config_file: .hound/eslintrc.json - ignore_file: .hound/ignoredfiles -tslint: - enabled: true - config_file: .hound/tslint.json - ignore_file: .hound/ignoredfiles -ruby: - enabled: true - config_file: .hound/rubocop.yml - ignore_file: .hound/ignoredfiles -scss: - enabled: true - config_file: .hound/scss-lint.yml - ignore_file: .hound/ignoredfiles diff --git a/.hound/eslintrc.json b/.hound/eslintrc.json deleted file mode 100644 index a6bf5198..00000000 --- a/.hound/eslintrc.json +++ /dev/null @@ -1,451 +0,0 @@ -{ - "env": { - "es6": true - }, - "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module" - }, - "plugins": ["import"], - "settings": { - "import/resolver": { - "node": { - "extensions": [".js", ".json"] - } - } - }, - "rules": { - "accessor-pairs": 0, - "array-callback-return": 2, - "block-scoped-var": 2, - "complexity": [ - 1, - { - "max": 20 - } - ], - "consistent-return": 2, - "curly": [2, "multi-line"], - "default-case": [ - 2, - { - "commentPattern": "^no default$" - } - ], - "dot-notation": [ - 1, - { - "allowKeywords": true - } - ], - "dot-location": [2, "property"], - "eqeqeq": [2], - "guard-for-in": 2, - "no-alert": 1, - "no-case-declarations": 2, - "no-div-regex": 0, - "no-else-return": 2, - "no-empty-function": [ - 2, - { - "allow": ["arrowFunctions", "functions", "methods"] - } - ], - "no-empty-pattern": 2, - "no-eval": 2, - "no-extend-native": 2, - "no-extra-bind": 2, - "no-fallthrough": 2, - "no-floating-decimal": 2, - "no-implicit-coercion": 0, - "no-implicit-globals": 2, - "no-implied-eval": 2, - "no-invalid-this": 0, - "no-iterator": 2, - "no-extra-label": 2, - "no-labels": [ - 2, - { - "allowLoop": false, - "allowSwitch": false - } - ], - "no-lone-blocks": 2, - "no-loop-func": 2, - "no-magic-numbers": [ - 2, - { - "ignore": [0, 1] - } - ], - "no-multi-spaces": 2, - "no-multi-str": 2, - "no-native-reassign": 2, - "no-new": 2, - "no-new-func": 2, - "no-new-wrappers": 2, - "no-octal": 2, - "no-octal-escape": 2, - "no-param-reassign": [ - 2, - { - "props": false - } - ], - "no-proto": 2, - "no-redeclare": 2, - "no-return-assign": 2, - "no-script-url": 2, - "no-self-assign": 2, - "no-self-compare": 2, - "no-sequences": 2, - "no-throw-literal": 2, - "no-unmodified-loop-condition": 0, - "no-unused-expressions": 2, - "no-unused-labels": 2, - "no-useless-call": 0, - "no-useless-concat": 2, - "no-useless-escape": 2, - "no-void": 0, - "no-warning-comments": [ - 1, - { - "terms": ["todo", "fixme", "xxx"], - "location": "start" - } - ], - "no-with": 2, - "radix": 2, - "vars-on-top": 2, - "wrap-iife": [2, "any"], - "yoda": 2, - "comma-dangle": [2, "always-multiline"], - "no-cond-assign": [2, "always"], - "no-console": 0, - "no-debugger": 0, - "no-constant-condition": 2, - "no-control-regex": 2, - "no-dupe-args": 2, - "no-dupe-keys": 2, - "no-duplicate-case": 2, - "no-empty": 2, - "no-empty-character-class": 2, - "no-ex-assign": 2, - "no-extra-boolean-cast": 0, - "no-extra-parens": [ - 0, - "all", - { - "conditionalAssign": true, - "nestedBinaryExpressions": false, - "returnAssign": false - } - ], - "no-extra-semi": 2, - "no-func-assign": 2, - "no-inner-declarations": 2, - "no-invalid-regexp": 2, - "no-irregular-whitespace": 2, - "no-negated-in-lhs": 2, - "no-obj-calls": 2, - "no-regex-spaces": 2, - "no-sparse-arrays": 2, - "no-unexpected-multiline": 0, - "no-unreachable": 2, - "no-unsafe-finally": 2, - "use-isnan": 2, - "valid-jsdoc": 0, - "valid-typeof": 2, - "arrow-body-style": [2, "as-needed"], - "arrow-parens": 0, - "arrow-spacing": [ - 2, - { - "before": true, - "after": true - } - ], - "constructor-super": 0, - "generator-star-spacing": [ - 2, - { - "before": true, - "after": false - } - ], - "no-class-assign": 2, - "no-confusing-arrow": [ - 2, - { - "allowParens": true - } - ], - "no-const-assign": 2, - "no-dupe-class-members": 2, - "no-duplicate-imports": 2, - "no-new-symbol": 2, - "no-restricted-imports": 0, - "no-this-before-super": 0, - "no-useless-computed-key": 2, - "no-useless-constructor": 2, - "no-var": 2, - "object-shorthand": [ - 2, - "always", - { - "ignoreConstructors": false, - "avoidQuotes": true - } - ], - "prefer-arrow-callback": [ - 2, - { - "allowNamedFunctions": false, - "allowUnboundThis": true - } - ], - "prefer-const": [ - 2, - { - "destructuring": "any", - "ignoreReadBeforeAssign": true - } - ], - "prefer-reflect": 0, - "no-caller": 2, - "prefer-rest-params": 2, - "prefer-spread": 2, - "prefer-template": 2, - "require-yield": 2, - "sort-imports": 0, - "template-curly-spacing": 2, - "yield-star-spacing": [2, "before"], - "import/no-unresolved": [0], - "import/named": 0, - "import/default": 0, - "import/namespace": 0, - "import/export": 2, - "import/no-named-as-default": 0, - "import/no-named-as-default-member": 0, - "import/no-deprecated": 0, - "import/no-extraneous-dependencies": [ - 0, - { - "devDependencies": false, - "optionalDependencies": false - } - ], - "import/no-mutable-exports": 2, - "import/no-commonjs": 0, - "import/no-amd": 2, - "import/no-nodejs-modules": 0, - "import/imports-first": [2, "absolute-first"], - "import/no-duplicates": 2, - "import/no-namespace": 0, - "import/extensions": [0, "never"], - "import/order": [ - 0, - { - "groups": [ - "builtin", - "external", - "internal", - "parent", - "sibling", - "index" - ], - "newlines-between": "never" - } - ], - "import/newline-after-import": 2, - "import/prefer-default-export": 2, - "array-bracket-spacing": [2, "never"], - "block-spacing": [2, "always"], - "brace-style": [ - 2, - "1tbs", - { - "allowSingleLine": true - } - ], - "camelcase": [ - 2, - { - "properties": "always" - } - ], - "comma-spacing": [ - 2, - { - "before": false, - "after": true - } - ], - "comma-style": [2, "last"], - "computed-property-spacing": [2, "never"], - "consistent-this": [2, "self"], - "eol-last": 2, - "func-names": 0, - "func-style": [2, "declaration"], - "id-blacklist": 0, - "id-length": 0, - "id-match": 0, - "indent": [2, 2], - "key-spacing": [ - 2, - { - "beforeColon": false, - "afterColon": true - } - ], - "keyword-spacing": [ - 2, - { - "before": true, - "after": true, - "overrides": { - "return": { - "after": true - }, - "throw": { - "after": true - }, - "case": { - "after": true - } - } - } - ], - "linebreak-style": [2, "unix"], - "lines-around-comment": 0, - "max-depth": [2, 4], - "max-len": [0], - "max-nested-callbacks": [2, 4], - "max-params": [1, 4], - "max-statements": [1, 10], - "max-statements-per-line": [ - 2, - { - "max": 1 - } - ], - "new-cap": [ - 2, - { - "newIsCap": true - } - ], - "new-parens": 2, - "newline-after-var": 0, - "newline-before-return": 2, - "newline-per-chained-call": [ - 2, - { - "ignoreChainWithDepth": 3 - } - ], - "no-array-constructor": 2, - "no-bitwise": 1, - "no-continue": 0, - "no-inline-comments": 0, - "no-lonely-if": 0, - "no-mixed-spaces-and-tabs": 2, - "no-multiple-empty-lines": [ - 2, - { - "max": 1, - "maxEOF": 1 - } - ], - "no-negated-condition": 2, - "no-nested-ternary": 2, - "no-new-object": 2, - "no-plusplus": 0, - "no-restricted-syntax": [ - 2, - "DebuggerStatement", - "ForInStatement", - "LabeledStatement", - "WithStatement" - ], - "no-spaced-func": 2, - "no-ternary": 0, - "no-trailing-spaces": 2, - "no-underscore-dangle": [1], - "no-unneeded-ternary": [ - 2, - { - "defaultAssignment": false - } - ], - "no-whitespace-before-property": 2, - "object-curly-spacing": [2, "always"], - "object-property-newline": [ - 0, - { - "allowMultiplePropertiesPerLine": true - } - ], - "one-var": [2, "never"], - "one-var-declaration-per-line": [2, "always"], - "operator-assignment": 2, - "operator-linebreak": [2, "after"], - "padded-blocks": [2, "never"], - "quote-props": [ - 2, - "as-needed", - { - "keywords": false, - "unnecessary": false, - "numbers": false - } - ], - "quotes": [ - 2, - "single", - { - "avoidEscape": true - } - ], - "require-jsdoc": 0, - "semi": [2, "always"], - "semi-spacing": [ - 2, - { - "before": false, - "after": true - } - ], - "sort-vars": 0, - "space-before-blocks": 2, - "space-before-function-paren": [ - 2, - { - "anonymous": "always", - "named": "never" - } - ], - "space-in-parens": [2, "never"], - "space-infix-ops": 2, - "space-unary-ops": 0, - "spaced-comment": [2], - "wrap-regex": 0, - "init-declarations": 0, - "no-catch-shadow": 2, - "no-delete-var": 0, - "no-label-var": 2, - "no-restricted-globals": 0, - "no-shadow": 2, - "no-shadow-restricted-names": 2, - "no-undef": 2, - "no-undef-init": 2, - "no-unused-vars": [ - 2, - { - "vars": "local", - "args": "after-used" - } - ], - "no-use-before-define": 2 - } -} diff --git a/.hound/ignoredfiles b/.hound/ignoredfiles deleted file mode 100644 index 9cac94e1..00000000 --- a/.hound/ignoredfiles +++ /dev/null @@ -1,2 +0,0 @@ -static/tipuesearch/ -static/magnific/ diff --git a/.hound/rubocop.yml b/.hound/rubocop.yml deleted file mode 100644 index a5e6f4fa..00000000 --- a/.hound/rubocop.yml +++ /dev/null @@ -1,1038 +0,0 @@ -AllCops: - Include: - - "**/*.rake" - - "**/Gemfile" - - "**/Rakefile" - Exclude: - - "vendor/**/*" - - "db/**/*" - - "bin/**/*" - DisplayCopNames: false - StyleGuideCopsOnly: false - TargetRubyVersion: 2.3 -Layout/AccessModifierIndentation: - Description: Check indentation of private/protected visibility modifiers. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected - Enabled: true - EnforcedStyle: indent - SupportedStyles: - - outdent - - indent -Layout/AlignHash: - Description: Align the elements of a hash literal if they span more than one line. - Enabled: true - EnforcedHashRocketStyle: key - EnforcedColonStyle: key - EnforcedLastArgumentHashStyle: always_inspect - SupportedLastArgumentHashStyles: - - always_inspect - - always_ignore - - ignore_implicit - - ignore_explicit -Layout/AlignParameters: - Description: Align the parameters of a method call if they span more than one line. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent - Enabled: true - EnforcedStyle: with_fixed_indentation - SupportedStyles: - - with_first_parameter - - with_fixed_indentation -Style/AndOr: - Description: Use &&/|| instead of and/or. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or - Enabled: true - EnforcedStyle: always - SupportedStyles: - - always - - conditionals -Style/BarePercentLiterals: - Description: Checks if usage of %() or %Q() matches configuration. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand - Enabled: true - EnforcedStyle: bare_percent - SupportedStyles: - - percent_q - - bare_percent -Metrics/BlockLength: - Enabled: false -Style/BracesAroundHashParameters: - Description: Enforce braces style around hash parameters. - Enabled: true - EnforcedStyle: no_braces - SupportedStyles: - - braces - - no_braces - - context_dependent -Layout/CaseIndentation: - Description: Indentation of when in a case/when/[else/]end. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case - Enabled: true - EnforcedStyle: case - SupportedStyles: - - case - - end - IndentOneStep: false -Style/ClassAndModuleChildren: - Description: Checks style of children classes and modules. - Enabled: false - EnforcedStyle: nested - SupportedStyles: - - nested - - compact -Style/ClassCheck: - Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`. - Enabled: true - EnforcedStyle: is_a? - SupportedStyles: - - is_a? - - kind_of? -Style/CollectionMethods: - Description: Preferred collection methods. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size - Enabled: false - PreferredMethods: - collect: map - collect!: map! - inject: reduce - detect: find - find_all: select - find: detect -Style/CommentAnnotation: - Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK, - REVIEW). - StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords - Enabled: false - Keywords: - - TODO - - FIXME - - OPTIMIZE - - HACK - - REVIEW -Layout/DotPosition: - Description: Checks the position of the dot in multi-line method calls. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains - Enabled: true - EnforcedStyle: leading - SupportedStyles: - - leading - - trailing -Layout/EmptyLineBetweenDefs: - Description: Use empty lines between defs. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods - Enabled: true - AllowAdjacentOneLineDefs: false -Layout/EmptyLinesAroundBlockBody: - Description: Keeps track of empty lines around block bodies. - Enabled: true - EnforcedStyle: no_empty_lines - SupportedStyles: - - empty_lines - - no_empty_lines -Layout/EmptyLinesAroundClassBody: - Description: Keeps track of empty lines around class bodies. - Enabled: true - EnforcedStyle: no_empty_lines - SupportedStyles: - - empty_lines - - no_empty_lines -Layout/EmptyLinesAroundModuleBody: - Description: Keeps track of empty lines around module bodies. - Enabled: true - EnforcedStyle: no_empty_lines - SupportedStyles: - - empty_lines - - no_empty_lines -Style/Encoding: - Description: Use UTF-8 as the source file encoding. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8 - Enabled: false - EnforcedStyle: always - SupportedStyles: - - when_needed - - always -Style/FileName: - Description: Use snake_case for source file names. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files - Enabled: false - Exclude: [] -Layout/FirstParameterIndentation: - Description: Checks the indentation of the first parameter in a method call. - Enabled: true - EnforcedStyle: special_for_inner_method_call_in_parentheses - SupportedStyles: - - consistent - - special_for_inner_method_call - - special_for_inner_method_call_in_parentheses -Style/For: - Description: Checks use of for or each in multiline loops. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops - Enabled: true - EnforcedStyle: each - SupportedStyles: - - for - - each -Style/FormatString: - Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf - Enabled: false - EnforcedStyle: format - SupportedStyles: - - format - - sprintf - - percent -Style/FrozenStringLiteralComment: - Enabled: false -Style/GlobalVars: - Description: Do not introduce global variables. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars - Enabled: false - AllowedVariables: [] -Style/GuardClause: - Description: Check for conditionals that can be replaced with guard clauses - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals - Enabled: false - MinBodyLength: 1 -Style/HashSyntax: - Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a => - 1, :b => 2 }.' - StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals - Enabled: true - EnforcedStyle: ruby19 - SupportedStyles: - - ruby19 - - hash_rockets -Style/IfUnlessModifier: - Description: Favor modifier if/unless usage when you have a single-line body. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier - Enabled: false - MaxLineLength: 80 -Layout/IndentationWidth: - Description: Use 2 spaces for indentation. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation - Enabled: true - Width: 2 -Layout/IndentHash: - Description: Checks the indentation of the first key in a hash literal. - Enabled: true - EnforcedStyle: special_inside_parentheses - SupportedStyles: - - special_inside_parentheses - - consistent -Style/LambdaCall: - Description: Use lambda.call(...) instead of lambda.(...). - StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call - Enabled: false - EnforcedStyle: call - SupportedStyles: - - call - - braces -Style/Next: - Description: Use `next` to skip iteration instead of a condition at the end. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals - Enabled: false - EnforcedStyle: skip_modifier_ifs - MinBodyLength: 3 - SupportedStyles: - - skip_modifier_ifs - - always -Style/NonNilCheck: - Description: Checks for redundant nil checks. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks - Enabled: true - IncludeSemanticChanges: false -Style/MethodDefParentheses: - Description: Checks if the method definitions have or don't have parentheses. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens - Enabled: true - EnforcedStyle: require_parentheses - SupportedStyles: - - require_parentheses - - require_no_parentheses -Style/MethodName: - Description: Use the configured style when naming methods. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars - Enabled: true - EnforcedStyle: snake_case - SupportedStyles: - - snake_case - - camelCase -Layout/MultilineOperationIndentation: - Description: Checks indentation of binary operations that span more than one line. - Enabled: true - EnforcedStyle: indented - SupportedStyles: - - aligned - - indented -Style/MutableConstant: - Description: Do not assign mutable objects to constants. - Enabled: false -Style/NumericLiterals: - Description: Add underscores to large numeric literals to improve their readability. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics - Enabled: false - MinDigits: 5 -Style/ParenthesesAroundCondition: - Description: Don't use parentheses around the condition of an if/unless/while. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if - Enabled: true - AllowSafeAssignment: true -Style/PercentLiteralDelimiters: - Description: Use `%`-literal delimiters consistently - StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces - Enabled: false - PreferredDelimiters: - "%": "()" - "%i": "()" - "%q": "()" - "%Q": "()" - "%r": "{}" - "%s": "()" - "%w": "()" - "%W": "()" - "%x": "()" -Style/PercentQLiterals: - Description: Checks if uses of %Q/%q match the configured preference. - Enabled: true - EnforcedStyle: lower_case_q - SupportedStyles: - - lower_case_q - - upper_case_q -Style/PredicateName: - Description: Check the names of predicate methods. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark - Enabled: true - NamePrefix: - - is_ - - has_ - - have_ - NamePrefixBlacklist: - - is_ -Style/RaiseArgs: - Description: Checks the arguments passed to raise/fail. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages - Enabled: false - EnforcedStyle: exploded - SupportedStyles: - - compact - - exploded -Style/RedundantReturn: - Description: Don't use return where it's not required. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return - Enabled: true - AllowMultipleReturnValues: false -Style/Semicolon: - Description: Don't use semicolons to terminate expressions. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon - Enabled: true - AllowAsExpressionSeparator: false -Style/SignalException: - Description: Checks for proper usage of fail and raise. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method - Enabled: false - EnforcedStyle: semantic - SupportedStyles: - - only_raise - - only_fail - - semantic -Style/SingleLineBlockParams: - Description: Enforces the names of some block params. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks - Enabled: false - Methods: - - reduce: - - a - - e - - inject: - - a - - e -Style/SingleLineMethods: - Description: Avoid single-line methods. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods - Enabled: false - AllowIfMethodIsEmpty: true -Style/StringLiterals: - Description: Checks if uses of quotes match the configured preference. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals - Enabled: false - EnforcedStyle: double_quotes - SupportedStyles: - - single_quotes - - double_quotes -Style/StringLiteralsInInterpolation: - Description: Checks if uses of quotes inside expressions in interpolated strings - match the configured preference. - Enabled: true - EnforcedStyle: single_quotes - SupportedStyles: - - single_quotes - - double_quotes -Layout/SpaceAroundBlockParameters: - Description: Checks the spacing inside and after block parameters pipes. - Enabled: true - EnforcedStyleInsidePipes: no_space - SupportedStylesInsidePipes: - - space - - no_space -Layout/SpaceAroundEqualsInParameterDefault: - Description: Checks that the equals signs in parameter default assignments have - or don't have surrounding space depending on configuration. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals - Enabled: true - EnforcedStyle: space - SupportedStyles: - - space - - no_space -Layout/SpaceBeforeBlockBraces: - Description: Checks that the left block brace has or doesn't have space before it. - Enabled: true - EnforcedStyle: space - SupportedStyles: - - space - - no_space -Layout/SpaceInsideBlockBraces: - Description: Checks that block braces have or don't have surrounding space. For - blocks taking parameters, checks that the left brace has or doesn't have trailing - space. - Enabled: true - EnforcedStyle: space - SupportedStyles: - - space - - no_space - EnforcedStyleForEmptyBraces: no_space - SpaceBeforeBlockParameters: true -Layout/SpaceInsideHashLiteralBraces: - Description: Use spaces inside hash literal braces - or don't. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators - Enabled: true - EnforcedStyle: space - EnforcedStyleForEmptyBraces: no_space - SupportedStyles: - - space - - no_space -Style/SymbolProc: - Description: Use symbols as procs instead of blocks when possible. - Enabled: true - IgnoredMethods: - - respond_to -Layout/TrailingBlankLines: - Description: Checks trailing blank lines and final newline. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof - Enabled: true - EnforcedStyle: final_newline - SupportedStyles: - - final_newline - - final_blank_line -Style/TrailingCommaInArguments: - Description: Checks for trailing comma in argument lists. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas - Enabled: true -Style/TrailingCommaInLiteral: - Description: Checks for trailing comma in array and hash literals. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas - Enabled: true -Style/TrivialAccessors: - Description: Prefer attr_* methods to trivial readers/writers. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family - Enabled: false - ExactNameMatch: false - AllowPredicates: false - AllowDSLWriters: false - Whitelist: - - to_ary - - to_a - - to_c - - to_enum - - to_h - - to_hash - - to_i - - to_int - - to_io - - to_open - - to_path - - to_proc - - to_r - - to_regexp - - to_str - - to_s - - to_sym -Style/VariableName: - Description: Use the configured style when naming variables. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars - Enabled: true - EnforcedStyle: snake_case - SupportedStyles: - - snake_case - - camelCase -Style/WhileUntilModifier: - Description: Favor modifier while/until usage when you have a single-line body. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier - Enabled: false - MaxLineLength: 80 -Style/WordArray: - Description: Use %w or %W for arrays of words. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w - Enabled: false - MinSize: 0 - WordRegex: !ruby/regexp /\A[\p{Word}]+\z/ -Metrics/AbcSize: - Description: A calculated magnitude based on number of assignments, branches, and - conditions. - Enabled: true - Max: 25 -Metrics/BlockNesting: - Description: Avoid excessive block nesting - StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count - Enabled: true - Max: 3 -Metrics/ClassLength: - Description: Avoid classes longer than 100 lines of code. - Enabled: false - CountComments: false - Max: 100 -Metrics/CyclomaticComplexity: - Description: A complexity metric that is strongly correlated to the number of test - cases needed to validate a method. - Enabled: true - Max: 6 -Metrics/LineLength: - Description: Limit lines to 100 characters. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#100-character-limits - Enabled: true - Max: 100 - AllowURI: true - URISchemes: - - http - - https -Metrics/MethodLength: - Description: Avoid methods longer than 15 lines of code. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods - Enabled: true - CountComments: true - Max: 15 - Exclude: - - "spec/**/*" -Metrics/ParameterLists: - Description: Avoid long parameter lists. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params - Enabled: false - Max: 5 - CountKeywordArgs: true -Metrics/PerceivedComplexity: - Description: A complexity metric geared towards measuring complexity for a human - reader. - Enabled: true - Max: 7 -Lint/AssignmentInCondition: - Description: Don't use assignment in conditions. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition - Enabled: false - AllowSafeAssignment: true -Lint/EndAlignment: - Description: Align ends correctly. - Enabled: true - EnforcedStyleAlignWith: keyword - SupportedStylesAlignWith: - - keyword - - variable -Lint/DefEndAlignment: - Description: Align ends corresponding to defs correctly. - Enabled: true - EnforcedStyleAlignWith: start_of_line - SupportedStylesAlignWith: - - start_of_line - - def -Rails/ActionFilter: - Description: Enforces consistent use of action filter methods. - Enabled: true - EnforcedStyle: action - SupportedStyles: - - action - - filter - Include: - - app/controllers/**/*.rb -Rails/HasAndBelongsToMany: - Description: Prefer has_many :through to has_and_belongs_to_many. - Enabled: true - Include: - - app/models/**/*.rb -Rails/Output: - Description: Checks for calls to puts, print, etc. - Enabled: true - Include: - - app/**/*.rb - - config/**/*.rb - - db/**/*.rb - - lib/**/*.rb -Rails/ReadWriteAttribute: - Description: Checks for read_attribute(:attr) and write_attribute(:attr, val). - Enabled: true - Include: - - app/models/**/*.rb -Rails/ScopeArgs: - Description: Checks the arguments of ActiveRecord scopes. - Enabled: true - Include: - - app/models/**/*.rb -Rails/Validation: - Description: Use validates :attribute, hash of validations. - Enabled: true - Include: - - app/models/**/*.rb -Style/InlineComment: - Description: Avoid inline comments. - Enabled: false -Style/MethodCalledOnDoEndBlock: - Description: Avoid chaining a method call on a do...end block. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks - Enabled: false -Style/SymbolArray: - Description: Use %i or %I for arrays of symbols. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i - Enabled: false -Layout/ExtraSpacing: - Description: Do not use unnecessary spacing. - Enabled: false -Style/AccessorMethodName: - Description: Check the naming of accessor methods for get_/set_. - Enabled: false -Style/Alias: - Description: Use alias_method instead of alias. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method - Enabled: false -Layout/AlignArray: - Description: Align the elements of an array literal if they span more than one line. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays - Enabled: true -Style/ArrayJoin: - Description: Use Array#join instead of Array#*. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join - Enabled: false -Style/AsciiComments: - Description: Use only ascii symbols in comments. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments - Enabled: false -Style/AsciiIdentifiers: - Description: Use only ascii symbols in identifiers. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers - Enabled: false -Style/Attr: - Description: Checks for uses of Module#attr. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr - Enabled: false -Style/BeginBlock: - Description: Avoid the use of BEGIN blocks. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks - Enabled: true -Style/BlockComments: - Description: Do not use block comments. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments - Enabled: false -Layout/BlockEndNewline: - Description: Put end statement of multiline block on its own line. - Enabled: true -Style/CaseEquality: - Description: Avoid explicit use of the case equality operator(===). - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality - Enabled: false -Style/CharacterLiteral: - Description: Checks for uses of character literals. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals - Enabled: false -Style/ClassAndModuleCamelCase: - Description: Use CamelCase for classes and modules. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes - Enabled: true -Style/ClassMethods: - Description: Use self when defining module/class methods. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-singletons - Enabled: true -Style/ClassVars: - Description: Avoid the use of class variables. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars - Enabled: false -Style/ColonMethodCall: - Description: 'Do not use :: for method call.' - StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons - Enabled: false -Layout/CommentIndentation: - Description: Indentation of comments. - Enabled: true -Style/ConstantName: - Description: Constants should use SCREAMING_SNAKE_CASE. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case - Enabled: true -Style/DefWithParentheses: - Description: Use def with parentheses when there are arguments. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens - Enabled: true -Style/PreferredHashMethods: - Description: Checks for use of deprecated Hash methods. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key - Enabled: false -Style/Documentation: - Description: Document classes and non-namespace modules. - Enabled: false -Style/DoubleNegation: - Description: Checks for uses of double negation (!!). - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang - Enabled: false -Style/EachWithObject: - Description: Prefer `each_with_object` over `inject` or `reduce`. - Enabled: false -Layout/ElseAlignment: - Description: Align elses and elsifs correctly. - Enabled: true -Style/EmptyElse: - Description: Avoid empty else-clauses. - Enabled: true -Layout/EmptyLines: - Description: Don't use several empty lines in a row. - Enabled: true -Layout/EmptyLinesAroundAccessModifier: - Description: Keep blank lines around access modifiers. - Enabled: true -Layout/EmptyLinesAroundMethodBody: - Description: Keeps track of empty lines around method bodies. - Enabled: true -Style/EmptyLiteral: - Description: Prefer literals to Array.new/Hash.new/String.new. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash - Enabled: false -Style/EndBlock: - Description: Avoid the use of END blocks. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks - Enabled: true -Layout/EndOfLine: - Description: Use Unix-style line endings. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf - Enabled: true -Style/EvenOdd: - Description: Favor the use of Fixnum#even? && Fixnum#odd? - StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods - Enabled: false -Style/FlipFlop: - Description: Checks for flip flops - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops - Enabled: false -Style/IfWithSemicolon: - Description: Do not use if x; .... Use the ternary operator instead. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs - Enabled: false -Layout/IndentationConsistency: - Description: Keep indentation straight. - Enabled: true -Layout/IndentArray: - Description: Checks the indentation of the first element in an array literal. - Enabled: true -Style/InfiniteLoop: - Description: Use Kernel#loop for infinite loops. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop - Enabled: true -Style/Lambda: - Description: Use the new lambda literal syntax for single-line blocks. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line - Enabled: false -Layout/LeadingCommentSpace: - Description: Comments should start with a space. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space - Enabled: true -Style/LineEndConcatenation: - Description: Use \ instead of + or << to concatenate two string literals at line - end. - Enabled: false -Style/MethodCallWithoutArgsParentheses: - Description: Do not use parentheses for method calls with no arguments. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens - Enabled: true -Style/ModuleFunction: - Description: Checks for usage of `extend self` in modules. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function - Enabled: false -Style/MultilineBlockChain: - Description: Avoid multi-line chains of blocks. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks - Enabled: false -Layout/MultilineBlockLayout: - Description: Ensures newlines after multiline block do statements. - Enabled: false -Style/MultilineIfThen: - Description: Do not use then for multi-line if/unless. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then - Enabled: true -Style/MultilineTernaryOperator: - Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.' - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary - Enabled: true -Style/NegatedIf: - Description: Favor unless over if for negative conditions (or control flow or). - StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives - Enabled: false -Style/NegatedWhile: - Description: Favor until over while for negative conditions. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives - Enabled: false -Style/NestedTernaryOperator: - Description: Use one expression per branch in a ternary operator. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary - Enabled: true -Style/NilComparison: - Description: Prefer x.nil? to x == nil. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods - Enabled: false -Style/Not: - Description: Use ! instead of not. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not - Enabled: true -Style/OneLineConditional: - Description: Favor the ternary operator(?:) over if/then/else/end constructs. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator - Enabled: false -Style/OpMethod: - Description: When defining binary operators, name the argument other. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg - Enabled: false -Style/PerlBackrefs: - Description: Avoid Perl-style regex back references. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers - Enabled: false -Style/Proc: - Description: Use proc instead of Proc.new. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc - Enabled: false -Style/RedundantBegin: - Description: Don't use begin blocks when they are not needed. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit - Enabled: true -Style/RedundantException: - Description: Checks for an obsolete RuntimeException argument in raise/fail. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror - Enabled: true -Style/RedundantSelf: - Description: Don't use self where it's not needed. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required - Enabled: true -Style/RescueModifier: - Description: Avoid using rescue in its modifier form. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers - Enabled: true -Style/SelfAssignment: - Description: Checks for places where self-assignment shorthand should have been - used. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment - Enabled: false -Layout/SpaceAfterColon: - Description: Use spaces after colons. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators - Enabled: true -Layout/SpaceAfterComma: - Description: Use spaces after commas. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators - Enabled: true -Layout/SpaceAroundKeyword: - Description: Use a space around keywords if appropriate. - Enabled: true -Layout/SpaceAfterMethodName: - Description: Do not put a space between a method name and the opening parenthesis - in a method definition. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces - Enabled: true -Layout/SpaceAfterNot: - Description: Tracks redundant space after the ! operator. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang - Enabled: true -Layout/SpaceAfterSemicolon: - Description: Use spaces after semicolons. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators - Enabled: true -Layout/SpaceBeforeComma: - Description: No spaces before commas. - Enabled: true -Layout/SpaceBeforeComment: - Description: Checks for missing space between code and a comment on the same line. - Enabled: true -Layout/SpaceBeforeFirstArg: - Description: Put a space between a method name and the first argument in a method - call without parentheses. - Enabled: true -Layout/SpaceBeforeSemicolon: - Description: No spaces before semicolons. - Enabled: true -Layout/SpaceAroundOperators: - Description: Use spaces around operators. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators - Enabled: true -Layout/SpaceInsideBrackets: - Description: No spaces after [ or before ]. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces - Enabled: true -Layout/SpaceInsideParens: - Description: No spaces after ( or before ). - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces - Enabled: true -Layout/SpaceInsideRangeLiteral: - Description: No spaces inside range literals. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals - Enabled: true -Style/SpecialGlobalVars: - Description: Avoid Perl-style global variables. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms - Enabled: false -Style/StructInheritance: - Description: Checks for inheritance from Struct.new. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new - Enabled: true -Layout/Tab: - Description: No hard tabs. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation - Enabled: true -Layout/TrailingWhitespace: - Description: Avoid trailing whitespace. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace - Enabled: true -Style/UnlessElse: - Description: Do not use unless with else. Rewrite these with the positive case first. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless - Enabled: true -Style/UnneededCapitalW: - Description: Checks for %W when interpolation is not needed. - Enabled: true -Style/UnneededPercentQ: - Description: Checks for %q/%Q when single quotes or double quotes would do. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q - Enabled: true -Style/VariableInterpolation: - Description: Don't interpolate global, instance and class variables directly in - strings. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate - Enabled: false -Style/WhenThen: - Description: Use when x then ... for one-line cases. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases - Enabled: false -Style/WhileUntilDo: - Description: Checks for redundant do after while or until. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do - Enabled: true -Lint/AmbiguousOperator: - Description: Checks for ambiguous operators in the first argument of a method invocation - without parentheses. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args - Enabled: false -Lint/AmbiguousRegexpLiteral: - Description: Checks for ambiguous regexp literals in the first argument of a method - invocation without parenthesis. - Enabled: false -Lint/BlockAlignment: - Description: Align block ends correctly. - Enabled: true -Lint/ConditionPosition: - Description: Checks for condition placed in a confusing position relative to the - keyword. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition - Enabled: false -Lint/Debugger: - Description: Check for debugger calls. - Enabled: true -Lint/DeprecatedClassMethods: - Description: Check for deprecated class method calls. - Enabled: false -Lint/DuplicateMethods: - Description: Check for duplicate methods calls. - Enabled: true -Lint/ElseLayout: - Description: Check for odd code arrangement in an else block. - Enabled: false -Lint/EmptyEnsure: - Description: Checks for empty ensure block. - Enabled: true -Lint/EmptyInterpolation: - Description: Checks for empty string interpolation. - Enabled: true -Lint/EndInMethod: - Description: END blocks should not be placed inside method definitions. - Enabled: true -Lint/EnsureReturn: - Description: Do not use return in an ensure block. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure - Enabled: true -Security/Eval: - Description: The use of eval represents a serious security risk. - Enabled: true -Lint/HandleExceptions: - Description: Don't suppress exception. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions - Enabled: false -Lint/InvalidCharacterLiteral: - Description: Checks for invalid character literals with a non-escaped whitespace - character. - Enabled: false -Lint/LiteralInCondition: - Description: Checks of literals used in conditions. - Enabled: false -Lint/LiteralInInterpolation: - Description: Checks for literals used in interpolation. - Enabled: false -Lint/Loop: - Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while - for post-loop tests. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break - Enabled: false -Lint/ParenthesesAsGroupedExpression: - Description: Checks for method calls with a space before the opening parenthesis. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces - Enabled: false -Lint/RequireParentheses: - Description: Use parentheses in the method call to avoid confusion about precedence. - Enabled: false -Lint/RescueException: - Description: Avoid rescuing the Exception class. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues - Enabled: true -Lint/ShadowingOuterLocalVariable: - Description: Do not use the same name as outer local variable for block arguments - or block local variables. - Enabled: true -Lint/StringConversionInInterpolation: - Description: Checks for Object#to_s usage in string interpolation. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s - Enabled: true -Lint/UnderscorePrefixedVariableName: - Description: Do not use prefix `_` for a variable that is used. - Enabled: false -Lint/UnusedBlockArgument: - Description: Checks for unused block arguments. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars - Enabled: true -Lint/UnusedMethodArgument: - Description: Checks for unused method arguments. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars - Enabled: true -Lint/UnreachableCode: - Description: Unreachable code. - Enabled: true -Lint/UselessAccessModifier: - Description: Checks for useless access modifiers. - Enabled: true -Lint/UselessAssignment: - Description: Checks for useless assignment to a local variable. - StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars - Enabled: true -Lint/UselessComparison: - Description: Checks for comparison of something with itself. - Enabled: true -Lint/UselessElseWithoutRescue: - Description: Checks for useless `else` in `begin..end` without `rescue`. - Enabled: true -Lint/UselessSetterCall: - Description: Checks for useless setter call to a local variable. - Enabled: true -Lint/Void: - Description: Possible use of operator/literal/variable in void context. - Enabled: false -Rails/Delegate: - Description: Prefer delegate method for delegations. - Enabled: false -Performance/RedundantBlockCall: - Description: Use `yield` instead of `block.call`. - Reference: https://github.com/JuanitoFatas/fast-ruby#proccall-vs-yield-code - Enabled: false diff --git a/.hound/stylelintrc.json b/.hound/stylelintrc.json deleted file mode 100644 index 453cee15..00000000 --- a/.hound/stylelintrc.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "rules": { - "declaration-bang-space-before": "always", - "declaration-bang-space-after": "never", - "declaration-property-value-blacklist": { - "/^border/": ["none"] - }, - "color-named": "never", - "stylelint-disable-reason": "always-before", - "declaration-block-no-duplicate-properties": true, - "rule-empty-line-before": [ - "always-multi-line", - { - "except": ["after-single-line-comment", "first-nested"] - } - ], - "block-no-empty": true, - "no-missing-end-of-source-newline": true, - "color-hex-length": "short", - "color-hex-case": "lower", - "color-no-invalid-hex": true, - "selector-no-id": true, - "declaration-no-important": true, - "indentation": 2, - "number-leading-zero": "never", - "no-duplicate-selectors": true, - "max-nesting-depth": 3, - "selector-pseudo-element-colon-notation": "double", - "selector-no-qualifying-type": true, - "shorthand-property-no-redundant-values": true, - "declaration-block-semicolon-newline-after": "always-multi-line", - "selector-list-comma-newline-after": "always", - "function-comma-space-after": "always-single-line", - "declaration-colon-space-after": "always", - "declaration-colon-space-before": "never", - "block-opening-brace-space-before": "always", - "function-parentheses-space-inside": "never", - "string-quotes": "single", - "declaration-block-trailing-semicolon": "always", - "no-eol-whitespace": true, - "number-no-trailing-zeros": true, - "function-url-quotes": "always", - "property-no-vendor-prefix": true, - "selector-no-vendor-prefix": true, - "media-feature-name-no-vendor-prefix": true, - "at-rule-no-vendor-prefix": true, - "value-no-vendor-prefix": true, - "length-zero-no-unit": true - } -} diff --git a/.hound/tslint.json b/.hound/tslint.json deleted file mode 100644 index f4b8c7ba..00000000 --- a/.hound/tslint.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "rules": { - "align": [true, "parameters", "arguments", "statements"], - "class-name": true, - "comment-format": [true, "check-space"], - "curly": true, - "eofline": true, - "forin": true, - "indent": [true, "spaces"], - "interface-name": [true, "never-prefix"], - "jsdoc-format": true, - "label-position": true, - "label-undefined": true, - "max-line-length": [true, 120], - "member-access": true, - "member-ordering": [ - true, - { - "order": "statics-first" - } - ], - "new-parens": true, - "no-any": false, - "no-arg": true, - "no-bitwise": true, - "no-conditional-assignment": true, - "no-consecutive-blank-lines": true, - "no-console": [true, "debug", "info", "log", "time", "timeEnd", "trace"], - "no-default-export": true, - "no-construct": true, - "no-constructor-vars": false, - "no-debugger": true, - "no-duplicate-key": true, - "no-duplicate-variable": true, - "no-empty": true, - "no-eval": true, - "no-internal-module": true, - "no-invalid-this": true, - "no-namespace": true, - "no-reference": true, - "no-shadowed-variable": true, - "no-string-literal": true, - "no-switch-case-fall-through": false, - "no-trailing-whitespace": true, - "no-unreachable": true, - "no-unused-expression": true, - "no-unused-variable": [true], - "no-use-before-declare": false, - "no-var-keyword": true, - "no-var-requires": true, - "object-literal-sort-keys": false, - "one-line": [ - true, - "check-catch", - "check-else", - "check-finally", - "check-open-brace", - "check-whitespace" - ], - "one-variable-per-declaration": [true, "ignore-for-loop"], - "quotemark": [true, "single", "avoid-escape"], - "radix": true, - "semicolon": [true, "always"], - "switch-default": false, - "trailing-comma": [ - true, - { - "singleline": "never", - "multiline": "always" - } - ], - "triple-equals": [true], - "typedef": [ - true, - "member-variable-declaration", - "variable-declaration", - "property-declaration", - "parameter" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - }, - { - "call-signature": "onespace", - "index-signature": "onespace", - "parameter": "onespace", - "property-declaration": "onespace", - "variable-declaration": "onespace" - } - ], - "use-isnan": true, - "variable-name": [ - true, - "ban-keywords", - "check-format", - "allow-pascal-case" - ], - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-module", - "check-operator", - "check-separator", - "check-type", - "check-typecast" - ] - } -} diff --git a/.yaspeller.json b/.yaspeller.json index ab8d8ef4..465933cd 100644 --- a/.yaspeller.json +++ b/.yaspeller.json @@ -63,6 +63,7 @@ "FontAwesome", "foss", "FreeLists", + "freelists", "fucking", "Gan", "Garamond", @@ -105,7 +106,7 @@ "Lin", "linuxabc", "MacBook", - "Mailchimp", + "mailchimp", "maintainer", "maintainers", "Makefile", diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 33c536a3..f89bafd7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,111 +1,3 @@ -# Where do I start? +See our documentation at following link -Developing Elegant is a community effort, so you are very welcome to help develop it further into the most elegant theme out there. - -The main repository of Elegant is on [GitHub][elegant], which you may fork and then submit pull requests to, in order for them to be merged. - -If you found any issues, or have ideas how to improve the theme, please submit an [issue]. - -Also see issues tagged as [Pull Request Welcome](https://github.com/Pelican-Elegant/elegant/labels/pull%20request%20welcome) – these are issues that are not directly on our roadmap, but if you have time to contribute, we would be very glad to review and accept your pull request. - -If you want to contribute to documentation instead, do so in the [documentation repository][documentation]. Some easy tasks to tackle there are tagged as [Good First Issue](https://github.com/Pelican-Elegant/documentation/labels/good%20first%20issue) - -# Contributing Code - -1. Create a new git branch specific to your changes, instead of making your commits in the master branch. For example, create a branch `fix-issue-119` and add commits to it that fix “issue 119”. -2. Update the [CHANGELOG] -3. Create pull request from your fix branch, say `fix-issue-119`, against `next` branch of Elegant. (We use `master` branch to make new releases. `next` is used for development.) -4. Each pull request should only have a single feature or fix. Do not add multiple features or bug fixes to the same pull request. -5. Squash your commits to reduce noise from commit history. Use your better judgement to decide which commits should stay in the commit history, or consult project maintainers if confused. -6. Have (at least) one other active contributor review your code. -7. Once at least one code reviewer has approved it, it will can be merged. - -## Git Tips for Newcomers - -Here are some tips on how to make your life with Git easier when contributing. - -### How To Set Up Your Git - -1. Create a fork of the [Elegant repository][elegant] by clicking on the “Fork” button. -2. Clone your fork to your computer by clicking on the “Clone or download” button and following the instructions there. -3. When in the Git repository of your fork, run the following command to set the main repository as the upstream: `git remote add upstream https://github.com/Pelican-Elegant/pelican-elegant.git` - -### Updating/Rebasing to Upstream - -Occasionally – often before a pull request is able to be merged – you will need to update your own (fork) repository to the upstream (i.e. [Elegant][elegant]) development (i.e. `next`) branch. This can be done as follows: - -1. `git fetch upstream next` -2. `git rebase upstream/next` - -### Squash Commits & More Complex Rebasing - -When creating a pull request in GitHub, you have the option to squash all commits, but sometimes you need to fix either the mess you made or some clashes that prevent a merge of the two branches. - -In both cases, the following command is your Swiss-army knife: - -`git rebase --interactive upstream/master` - -For more on the interactive rebase command of Git, see [its official documentation][git_rebase]. - -[git_rebase]: https://git-scm.com/docs/user-manual#interactive-rebase - -# New Features and Styles - -If you plan to add new features to the theme, please make sure that: - -- you set sensible defaults so the theme works out of the box, without forcing the user to set any variable -- your changes do not negatively effect readability and reading experience -- your changes do not cause distraction for the reader -- any bigger features should go through the voting process (see below) - -# Code style - -Please make sure to follow the code style of the existing code base. - -Specifically: - -## Code/Template Formatting Rules - -- use single (`''`) rather than double (`""`) quotation marks for Jinja strings -- in Jinja print statements, surround the variable with spaces inside curly braces – for example: `{{ foo.bar }}` -- use double (`""`) quotation marks around HTML attributes -- end files with a newline - -## CSS Formatting Rules - -- font name’s first letter should be capital -- add a space after comma -- declarations should be sorted alphabetically -- use a single space between the last selector and the opening brace that begins the declaration block -- group together related classes and identities -- add a space after colon -- remove leading 0s -- remove unit specification after 0 values -- use three-digit Hex notation for colors wherever possible -- use hyphen `-` instead of underscore `_` in class and identity names - -Refer to [Google's HTML/CSS Style Guide][google_style_guide] for all other formatting rules. - -# Voting Process - -Any new features, bigger changes, decisions on what should constitute the next milestone or wider goals etc. should go through a vote, as follows. - -1. Open a new issue to describe it and to kick-start a discussion. -1. As soon as a suggestion (or several) are set in place, set a deadline, no shorter than 10 days. Also at this stage tag the issue with the “vote” label. -1. People can vote with the :+1: and :-1: emoji on individual suggestions. Anyone may cast votes for as many suggestions as they want. -1. At the end of the deadline, the suggestion with most votes (= № of :+1: - № of :-1:) is taken. - -# Licensing (Inbound=Outbound) - -All contributions will be understood to be made under the same (inbound) license as the main (outbound) license of the repository it is being contributed to – so [MIT License][] for all [code/theme][elegant] contributions, and [CC-BY-SA-3.0][] for all [documentation][] contributions. - -If you are contributing code that is not yours, make sure to indicate where you got the code from (and who the author/copyright holder is) and what license you got it under. - -[cc-by-sa-3.0]: https://spdx.org/licenses/CC-BY-SA-3.0.html -[changelog]: https://github.com/Pelican-Elegant/elegant/blob/master/CHANGELOG.md -[contributing]: ./CONTRIBUTING.md -[documentation]: https://github.com/Pelican-Elegant/documentation -[elegant]: https://github.com/Pelican-Elegant/elegant -[google_style_guide]: https://google.github.io/styleguide/htmlcssguide.html -[issue]: https://github.com/Pelican-Elegant/elegant/issues/ -[mit license]: https://spdx.org/licenses/MIT.html +http://localhost:9000/categories.html#contributing-ref diff --git a/documentation/content/Analytics/google-analytics.md b/documentation/content/Analytics/google-analytics.md index 3e339372..442828af 100644 --- a/documentation/content/Analytics/google-analytics.md +++ b/documentation/content/Analytics/google-analytics.md @@ -1,3 +1,4 @@ +--- Title: How to use Google Analytics Tags: web-analytics Category: Analytics @@ -5,9 +6,10 @@ Date: 2013-11-11 23:05 Slug: how-to-use-google-analytics Disqus_identifier: cf14ac5-how-to-use-google-analytics Subtitle: -Summary: Elegant Pelican theme supports Google Analytics out of -the box. This articles describes how to set it up. +Summary: Elegant Pelican theme supports Google Analytics out of the box. This articles describes how to set it up. Keywords: +authors: Talha Mansoor +--- Elegant supports the popular web tracking service, [Google Analytics](http://www.google.com/analytics/). diff --git a/documentation/content/Analytics/stat-counter.md b/documentation/content/Analytics/stat-counter.md index bce0ff48..6475ec70 100644 --- a/documentation/content/Analytics/stat-counter.md +++ b/documentation/content/Analytics/stat-counter.md @@ -1,3 +1,4 @@ +--- Title: How to use StatCounter Tags: web-analytics Category: Analytics @@ -5,9 +6,10 @@ Date: 2013-11-11 23:05 Slug: how-to-use-statcounter-analytics Disqus_identifier: 4kv80xq-how-to-use-statcounter Subtitle: -Summary: Elegant Pelican theme supports StatCounter out of -the box. This articles describes how to set them up. +Summary: Elegant Pelican theme supports StatCounter out of the box. This articles describes how to set them up. Keywords: +authors: Talha Mansoor +--- Elegant has support for popular web tracking service, [StatCounter](http://statcounter.com/). diff --git a/documentation/content/Appearance and Style/article-subtitle.md b/documentation/content/Appearance and Style/article-subtitle.md new file mode 100644 index 00000000..30868df2 --- /dev/null +++ b/documentation/content/Appearance and Style/article-subtitle.md @@ -0,0 +1,25 @@ +--- +Title: Article Subtitle +Tags: nuances +layout: post +Date: 2013-08-27 23:20 +comments: false +Slug: article-subtitle +Category: Appearance & Style +authors: Talha Mansoor +--- + +Pelican lets you define title of your article in the meta data. Elegant adds +subtitle support. Just define `subtitle` in your article's meta data and it +will appear along with your title. Here is an example, + +![Article subtitle +example]({static}/images/elegant-theme_article-subtitle.png) + +Article subtitle is displayed with the title in every list. To keep it visibly +separate from title, subtitle is enclosed in `` tag. When visible cue +cannot be used, like in the title attribute of HTML anchor tag ``, a hyphen +is inserted between them. + +![Article title and subtitle separated with a +hyphen]({static}/images/elegant-theme_article-subtitle-hyphen.png) diff --git a/documentation/content/Appearance and Style/modified-date.md b/documentation/content/Appearance and Style/modified-date.md index 96be6ec1..fa5b3fba 100644 --- a/documentation/content/Appearance and Style/modified-date.md +++ b/documentation/content/Appearance and Style/modified-date.md @@ -1,3 +1,4 @@ +--- Title: How does modified metadata works Tags: web-design, meta-data, date Category: Appearance & Style @@ -7,6 +8,8 @@ Disqus_identifier: q4nz2k0-how-does-modified-metadata-works Subtitle: Summary: Use modified metadata to show the date at which you last updated the article Keywords: +authors: Talha Mansoor +--- You need to update your articles time and again. Sometimes it makes sense to display the date when you updated the article. You can show the last updated diff --git a/documentation/content/Appearance and Style/page-title.md b/documentation/content/Appearance and Style/page-title.md new file mode 100644 index 00000000..ef6b2bf2 --- /dev/null +++ b/documentation/content/Appearance and Style/page-title.md @@ -0,0 +1,34 @@ +--- +Title: Page Title +Tags: nuances +layout: post +Date: 2013-08-27 23:20 +comments: false +Slug: page-title +Category: Appearance & Style +authors: Talha Mansoor +--- + +Elegant follows following format for the `` tag + +``` +Article title · Site Name +``` + +![Article title is always visible in the +tab]({static}/images/elegant-theme_page-title.png) + +Some sites put site title first and article title later in the `<title>` tag. +There is a problem with this approach. When you open too many tabs, browser +delimits tab's title from the end. In such cases, only the first few words or +even letters of the `<title>` are left visible. + +If visitor has opened several tabs from your website, all tabs will have "Site +Name..." title. User will need to click on each tab to identify his required +tab from the content. But with Elegant's approach article title will always be +visible, and reader will have less difficultly in identifying the tab he is +after. + +Putting site title before the article title increases your site name +visibility. Elegant achieves this by putting site name in the top navigation +bar of every page, where it always stays above the fold. diff --git a/documentation/content/Appearance and Style/table-of-contents.md b/documentation/content/Appearance and Style/table-of-contents.md index dd7a5a1d..2a677d93 100644 --- a/documentation/content/Appearance and Style/table-of-contents.md +++ b/documentation/content/Appearance and Style/table-of-contents.md @@ -1,3 +1,4 @@ +--- Title: How Elegant displays Table of Contents Tags: reST, markdown, navigation, web-design, contents Category: Appearance & Style @@ -7,6 +8,8 @@ Disqus_identifier: lm95rjd-how-elegant-displays-table-of-contents Subtitle: Summary: Elegant shows Table of Contents, if available, non intrusively to give a clean reading experience to the visitor Keywords: +authors: Talha Mansoor +--- [TOC] diff --git a/documentation/content/Appearance and Style/web-safe-fonts.md b/documentation/content/Appearance and Style/web-safe-fonts.md new file mode 100644 index 00000000..2a082287 --- /dev/null +++ b/documentation/content/Appearance and Style/web-safe-fonts.md @@ -0,0 +1,15 @@ +--- +Title: Web Safe Fonts +Tags: web-design +Category: Appearance & Style +Date: 2014-04-22 16:23 +Slug: web-safe-fonts +authors: Talha Mansoor +--- + +Elegant uses commonly available typefaces in every style rule. It has a list of +closely matching fonts in the fallback list. + +For examples Baskerville is the +first choice for headings. But if reader does not have Baskerville installed, +Garamond will be used. If that too fails then Georgia will be used. diff --git a/documentation/content/Building Readership/disqus-comments.md b/documentation/content/Building Readership/disqus-comments.md deleted file mode 100644 index b591f3d7..00000000 --- a/documentation/content/Building Readership/disqus-comments.md +++ /dev/null @@ -1,47 +0,0 @@ -Title: How to use Disqus Comments "Elegantly" -Tags: pelican-theme, pelican-plugin -Category: Building Readership -Date: 2014-04-21 16:39 -Slug: how-to-use-disqus-comments-elegantly -Disqus_identifier: 9jgwmy8-how-to-use-disqus-comments-elegantly -Subtitle: -Summary: Elegant offers Disqus comments out of the box with few unique features -Keywords: - -Pelican uses Disqus for comments. You have to set `DISQUS_SITENAME` to Disqus -site name identifier in configuration to enable comments. - -But that's not all. Elegant raises the notch up with following unique features. - -## Invite Visitors to Comment - -Instead of just throwing in comments form at the end of every article, Elegant -offers you a way to write introductory text that would appear right before comments. - -![Introductory text to the comments]({static}/images/elegant-theme_comments-introduction.png) - -Set your message to `comments_intro` in the article metadata. You may also -define `COMMENTS_INTRO` in Pelican configuration. - -Write whatever you think is appropriate to invite the visitor to comment. Be -creative! You can even put a link to your twitter account or newsletter there. - -Elegant first looks for `comments_intro` in article metadata, then for -`COMMENTS_INTRO` in configuration. If it finds neither then no message is -displayed. - -## Disqus Thread ID - -Most Pelican themes pass article URL to Disqus as the [Disqus -identifier](http://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables#disqus_identifier). - -This puts you at a disadvantage. If you are forced to change URL of an article -you will lose Disqus discussion for that article because Disqus identifier for -the article will change too. - -Elegant offers you `disqus_identifier` property that you can set in your -article metadata. Set it to any unique string you want. It won't be effected by -the article URL. - -If you choose not to use `disqus_identifier`, Elegant passes article URL to -Disqus. diff --git a/documentation/content/Code Snippets/code-style.md b/documentation/content/Code Snippets/code-style.md new file mode 100644 index 00000000..c87ea2d4 --- /dev/null +++ b/documentation/content/Code Snippets/code-style.md @@ -0,0 +1,20 @@ +--- +Title: Code Snippets Theme +Tags: markdown, reST, code-snippets, gist +layout: post +Date: 2013-08-27 23:20 +comments: false +Slug: code-snippets-theme +Category: Code Snippets +authors: Talha Mansoor +--- + +Elegant uses [Solarized](http://ethanschoonover.com/solarized) theme for syntax +highlighting. Line numbers have a different background color so that they +appear distinct from the code. Here is an example + + #!c + int sample_function (void) { + printf ("This is a sample function"); + return 0 + } diff --git a/documentation/content/Code Snippets/custome-syntax-theme.md b/documentation/content/Code Snippets/custome-syntax-theme.md new file mode 100644 index 00000000..0887e94c --- /dev/null +++ b/documentation/content/Code Snippets/custome-syntax-theme.md @@ -0,0 +1,22 @@ +--- +Title: Change Syntax Highlight Theme +Tags: unique +Date: 2019-07-03 20:18 +Slug: change-syntax-highlight-theme +Category: Code Snippets +authors: Talha Mansoor +--- + +Elegant uses [Solarized theme](http://ethanschoonover.com/solarized) for syntax +highlighting. To replace it, copy contents of your preferred theme's CSS style +sheet into `custom.css`. + +Alternatively, you can replace contents of `pygments.css` with your theme's +style sheet. + +If you feel like experimenting with different themes then [this +repository](https://github.com/uraimo/pygments-vimstyles) has Pygments CSS of +Vim themes. [This one](https://github.com/richleland/pygments-css) has Pygments +CSS of built-in styles. Do not forget to change `.codehilite` CSS class +identifier to `.highlight`. Code blocks in Pelican generated HTML use +`.highlight` class. diff --git a/documentation/content/Appearance and Style/line-numbers-code-snippet.md b/documentation/content/Code Snippets/line-numbers-code-snippet.md similarity index 84% rename from documentation/content/Appearance and Style/line-numbers-code-snippet.md rename to documentation/content/Code Snippets/line-numbers-code-snippet.md index 2825af6a..94fdb9a2 100644 --- a/documentation/content/Appearance and Style/line-numbers-code-snippet.md +++ b/documentation/content/Code Snippets/line-numbers-code-snippet.md @@ -1,12 +1,14 @@ -Title: How to display Line Numbers in Code Snippets +--- +Title: Display Line Numbers in Code Snippets Tags: markdown, reST, code-snippets, gist -Category: Appearance & Style +Category: Code Snippets Date: 2013-11-05 17:36 -Slug: how-to-display-line-numbers-in-code-snippets -Disqus_identifier: wmo972t-how-to-display-line-numbers-in-code-snippets +Slug: display-line-numbers-in-code-snippets Subtitle: Summary: reStructuredText and Markdown have directives that generate line numbers for code blocks. Use them to display line numbers in code snippets. Keywords: codehilite, python-markdown +authors: Talha Mansoor +--- reStructuredText and Markdown have directives that generate line numbers for code snippets. Install [Pygments](http://pygments.org/) to use these directives. diff --git a/documentation/content/Comments/collapsible-comments.md b/documentation/content/Comments/collapsible-comments.md new file mode 100644 index 00000000..19f2609b --- /dev/null +++ b/documentation/content/Comments/collapsible-comments.md @@ -0,0 +1,34 @@ +--- +Title: Collapsible Comments +Tags: interaction +layout: post +Date: 2013-08-27 23:20 +comments: false +Slug: collapsible-comments +Category: Commenting +authors: Talha Mansoor +--- + +Readers use scroll bar to track their progress when reading inside their +browsers. Very often comments take up more space than the actual article. When +comments take up more space, it throws the scroll bar proportion off and reader +cannot judge his progress correctly. Hacker News hosted [a +discussion](https://news.ycombinator.com/item?id=6246777) on this topic. + +> tons of online articles list comments on the same page, so the scroll bar is +> almost a negative incentive to keep reading. "I've read this much of the +> article and I'm only 1/20th of the way down?" +> [user stops reading, unaware that there's 450 comments and the article is actually pretty short] + +Elegant keeps the comments section hidden by default. Reader can hide and +unhide the section by clicking on the comments section. + +This is how comments section appear + +![Collapsed comments +section]({static}/images/elegant-theme_comments-section-collapsed.png) + +It expands when reader clicks on it + +![Uncollapsed comments +section]({static}/images/elegant-theme_comments-section-uncollapsed.png) diff --git a/documentation/content/Comments/comment-id.md b/documentation/content/Comments/comment-id.md new file mode 100644 index 00000000..06e860fe --- /dev/null +++ b/documentation/content/Comments/comment-id.md @@ -0,0 +1,28 @@ +--- +Title: Comments Thread ID +Tags: interaction +layout: post +date: 2019-06-30 22:29 +comments: false +Slug: comments-thread-id +Category: Commenting +authors: Talha Mansoor +--- + +Most Pelican themes pass article URL to Disqus as the [Disqus +identifier](http://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables#disqus_identifier). + +This puts you at a disadvantage. If you are forced to change URL of an article +you will lose Disqus discussion for that article because Disqus identifier for +the article will change too. + +Elegant offers you `comment_id` property that you can set in your +article metadata. Set it to any unique string you want. It won't be effected by +the article URL. + +If you choose not to use `comment_id`, Elegant passes article URL to +Disqus. + +## Legacy Variable + +In previous versions, we had `disqus_identifier`. Though Elegant is backward compatible but we recommend you to change it to `comment_id`. diff --git a/documentation/content/Comments/disable-comments.md b/documentation/content/Comments/disable-comments.md new file mode 100644 index 00000000..3aef9ede --- /dev/null +++ b/documentation/content/Comments/disable-comments.md @@ -0,0 +1,23 @@ +--- +Title: Disable Comments +Tags: interaction +layout: post +date: 2019-01-12 16:29 +comments: false +Slug: disable-comments-per-article +Category: Commenting +authors: Talha Mansoor +--- + +If you remove your comment service configuration, say you set `DISQUS_SITENAME` to empty string, then comments will disappear from all the articles. + +Sometimes you want to disable comments on selected articles. In which case, you can set `comments` variable in the article metadata to `false`. + +Here is an example, + +```yaml +Title: Disable Comments +date: 2019-01-12 16:29 +comments: false +Category: Commenting +``` diff --git a/documentation/content/Comments/disqus-comments.md b/documentation/content/Comments/disqus-comments.md new file mode 100644 index 00000000..53dd934b --- /dev/null +++ b/documentation/content/Comments/disqus-comments.md @@ -0,0 +1,16 @@ +--- +Title: Enable Disqus Comments +Tags: interaction +Category: Commenting +Date: 2014-04-21 16:39 +Slug: enable-disqus-comments +comment_id: 9jgwmy8-how-to-use-disqus-comments-elegantly +Subtitle: +Summary: Elegant offers Disqus comments out of the box with few unique features +authors: Talha Mansoor +--- + +You can use Disqus for comments. You have to set `DISQUS_SITENAME` to Disqus +site name identifier in configuration to enable comments. + +That's it. Elegant will take care of the rest. diff --git a/documentation/content/Comments/invite-comments.md b/documentation/content/Comments/invite-comments.md new file mode 100644 index 00000000..787e72e1 --- /dev/null +++ b/documentation/content/Comments/invite-comments.md @@ -0,0 +1,25 @@ +--- +Title: Invite Visitors To Comment +Tags: interaction +layout: post +Date: 2014-04-21 16:39 +comments: false +Slug: invite-visitors-comment +Category: Commenting +authors: Talha Mansoor +--- + +Instead of just throwing in comments form at the end of every article, Elegant +offers you a way to write introductory text that would appear right before comments. + +![Introductory text to the comments]({static}/images/elegant-theme_comments-introduction.png) + +Set your message to `comments_intro` in the article metadata. You may also +define `COMMENTS_INTRO` in Pelican configuration. + +Write whatever you think is appropriate to invite the visitor to comment. Be +creative! You can even put a link to your twitter account or newsletter there. + +Elegant first looks for `comments_intro` in article metadata, then for +`COMMENTS_INTRO` in configuration. If it finds neither then no message is +displayed. diff --git a/documentation/content/Contributing/adding-new-features.md b/documentation/content/Contributing/adding-new-features.md new file mode 100644 index 00000000..9ba88fe5 --- /dev/null +++ b/documentation/content/Contributing/adding-new-features.md @@ -0,0 +1,13 @@ +--- +Title: Contributing New Features +Date: 2019-07-03 22:17 +Slug: contributing-new-features +Category: Contributing +authors: Talha Mansoor +--- + +If you plan to add new features to the theme, please make sure that: + +- you set sensible defaults so the theme works out of the box, without forcing the user to set any variable +- your changes do not negatively effect readability and reading experience +- your changes do not cause distraction for the reader diff --git a/documentation/content/Contributing/beginners-guide.md b/documentation/content/Contributing/beginners-guide.md new file mode 100644 index 00000000..0a2b9999 --- /dev/null +++ b/documentation/content/Contributing/beginners-guide.md @@ -0,0 +1,34 @@ +--- +Title: Git Tips for Beginners +Date: 2019-07-03 21:57 +Slug: git-tips-for-beginners +Category: Contributing +--- + +Here are some tips on how to make your life with Git easier when contributing. + +## How To Set Up Your Git + +1. Create a fork of the [Elegant repository][elegant] by clicking on the “Fork” button. +2. Clone your fork to your computer by clicking on the “Clone or download” button and following the instructions there. +3. When in the Git repository of your fork, run the following command to set the main repository as the upstream: `git remote add upstream https://github.com/Pelican-Elegant/pelican-elegant.git` + +## Updating/Rebasing to Upstream + +Occasionally – often before a pull request is able to be merged – you will need to update your own (fork) repository to the upstream (i.e. [Elegant][elegant]) development (i.e. `next`) branch. This can be done as follows: + +1. `git fetch upstream next` +2. `git rebase upstream/next` + +## Squash Commits & More Complex Rebasing + +When creating a pull request in GitHub, you have the option to squash all commits, but sometimes you need to fix either the mess you made or some clashes that prevent a merge of the two branches. + +In both cases, the following command is your Swiss-army knife: + +`git rebase --interactive upstream/master` + +For more on the interactive rebase command of Git, see [its official documentation][git_rebase]. + +[git_rebase]: https://git-scm.com/docs/user-manual#interactive-rebase +[elegant]: https://github.com/Pelican-Elegant/elegant diff --git a/documentation/content/Announcements/community-driven-project.md b/documentation/content/Contributing/community-driven-project.md similarity index 99% rename from documentation/content/Announcements/community-driven-project.md rename to documentation/content/Contributing/community-driven-project.md index b287e30d..998255bf 100644 --- a/documentation/content/Announcements/community-driven-project.md +++ b/documentation/content/Contributing/community-driven-project.md @@ -1,7 +1,7 @@ --- Title: Elegant grows into a community-led project Tags: project-management -Category: Announcements +Category: Contributing Date: 2019-01-05 19:40 Slug: community-led-project Subtitle: The beginning of a beautiful friendship diff --git a/documentation/content/Contributing/contributing-license.md b/documentation/content/Contributing/contributing-license.md new file mode 100644 index 00000000..a0caf9e9 --- /dev/null +++ b/documentation/content/Contributing/contributing-license.md @@ -0,0 +1,15 @@ +--- +Title: Contributions License +Date: 2019-07-03 22:07 +Slug: contribution-license +Category: Contributing +--- + +All contributions will be understood to be made under the same (inbound) license as the main (outbound) license of the repository it is being contributed to – so [MIT License][] for all code/theme contributions, and [CC-BY-SA-3.0][] for all documentation contributions. + +If you are contributing code that is not yours, make sure to indicate where you got the code from (and who the author/copyright holder is) and what license you got it under. + +[cc-by-sa-3.0]: https://spdx.org/licenses/CC-BY-SA-3.0.html +[documentation]: https://github.com/Pelican-Elegant/documentation +[elegant]: https://github.com/Pelican-Elegant/elegant +[mit license]: https://spdx.org/licenses/MIT.html diff --git a/documentation/content/Contributing/inviation.md b/documentation/content/Contributing/inviation.md new file mode 100644 index 00000000..d36bd858 --- /dev/null +++ b/documentation/content/Contributing/inviation.md @@ -0,0 +1,22 @@ +--- +Title: Invitation to participate +Date: 2019-07-03 20:07 +Slug: invitation-to-participate +Category: Contributing +--- + +Our brand new documentation website [elegant.onCrashReboot.com][elegant-home] is a great demo for the theme. + +If you like the theme and would like to contribute to Elegant, you are most welcome to do so. Even though Pelican is written in Python, no coding skills are needed to help out with Elegant, as themes consist mostly of [Jinja][] templates, CSS and HTML. It is honestly very easily to get into. + +If you want to help out, but have no idea where to start, we keep a list of [low-priority features that are just waiting for you to pick up][pr_welcome]. + +Another way to contribute is to help with the [documentation][docs]. We are keeping a list of [good first issues][docs_first] for newbies to get involved – these are easy to tackle, but in no way less helpful. + +And, of course, reporting bugs and filing feature requests to further improve Elegant (and its documentation), is also welcome. + +[jinja]: http://jinja.pocoo.org/ +[pr_welcome]: https://github.com/Pelican-Elegant/elegant/labels/pull%20request%20welcome +[docs]: https://github.com/Pelican-Elegant/elegant/tree/master/documentation +[docs_first]: https://github.com/Pelican-Elegant/elegant/issues?q=is%3Aopen+is%3Aissue+label%3A%22project+documentation%22 +[elegant-home]: https://elegant.oncrashreboot.com diff --git a/documentation/content/Contributing/jinja-style.md b/documentation/content/Contributing/jinja-style.md new file mode 100644 index 00000000..e9923a71 --- /dev/null +++ b/documentation/content/Contributing/jinja-style.md @@ -0,0 +1,16 @@ +--- +Title: Code Style for Jinja2 +Date: 2019-07-03 22:17 +Slug: code-style-for-jinja2 +Category: Contributing +authors: Talha Mansoor +--- + +Please make sure to follow the code style of the existing code base. + +Specifically: + +- use single (`''`) rather than double (`""`) quotation marks for Jinja strings +- in Jinja print statements, surround the variable with spaces inside curly braces – for example: `{{ foo.bar }}` +- use double (`""`) quotation marks around HTML attributes +- end files with a newline diff --git a/documentation/content/Elegant - Pelican Theme/configuration-variables.md b/documentation/content/Elegant - Pelican Theme/configuration-variables.md deleted file mode 100644 index 47fb81a0..00000000 --- a/documentation/content/Elegant - Pelican Theme/configuration-variables.md +++ /dev/null @@ -1,107 +0,0 @@ -Title: Configuration Variables and Metadata List -Tags: pelican-theme, config -Category: Elegant - Pelican Theme -Date: 2014-04-23 18:25 -Slug: configuration-variables-and-metadata-list -Disqus_identifier: dexlwa8-configuration-variables-and-metadata-list -Subtitle: -Summary: List of all the configuration variables and metadata that you can use with Elegant -Keywords: - -[TOC] - -## Pelican Configuration - -These are the settings that will help you get the most out of Elegant - - #!python - TAG_SAVE_AS = '' - AUTHOR_SAVE_AS = '' - CATEGORY_SAVE_AS = '' - STATIC_PATHS = ['theme/images', 'images'] - PLUGINS = ['sitemap', 'extract_toc', 'tipue_search', - 'neighbors', 'assets', 'share_post'] - MD_EXTENSIONS = ['codehilite(css_class=highlight)', 'extra', - 'headerid', 'toc(permalink=true)'] - DIRECT_TEMPLATES = (('index', 'tags', 'categories','archives', 'search', '404')) - -## Configuration Variables - -These are the optional configuration variables that you can define - -1. `PROJECTS` used for [Projects - feature](elegant-best-pelican-theme-features#projects) - on the landing page -1. `PROJECTS_TITLE` used for changing title of `PROJECTS` list -1. `USE_SHORTCUT_ICONS` used for [shortcut icons like favicon, Opera Speed - Dial](how-to-set-shortcut-icons) -1. `SITE_LICENSE` used to add [site - license](few-more-features-of-elegant#add-license-to-your-site) -1. `SITE_SUBTITLE` used to add [site subtitle in the - footer](few-more-features-of-elegant#site-subtitle) -1. `COMMENTS_INTRO` used with - [comments](how-to-use-disqus-comments-elegantly#invite-visitors-to-comment) -1. `SITE_DESCRIPTION` used for [Search Engine - Optimization](search-engine-and-social-media-optimization#search-engine-optimization-seo) -1. `LANDING_PAGE_ABOUT` used for [About me - feature](elegant-best-pelican-theme-features#about-me) - on the landing page -1. `SOCIAL_PROFILE_LABEL` used with [social media profiles - widget](how-to-display-your-social-media-profiles) -1. `RECENT_ARTICLES_COUNT` see the post [Recent - Articles](elegant-best-pelican-theme-features#recent-articles) - -These are the variables used for [Mailchimp subscriber -form](elegant-best-pelican-theme-features#mailchimp) in the sidebar, - -1. `MAILCHIMP_FORM_ACTION` is mandatory. Set it to your Mailchimp form action - URL -1. `SUBSCRIBE_BUTTON_TITLE` -1. `EMAIL_FIELD_PLACEHOLDER` -1. `EMAIL_SUBSCRIPTION_LABEL` - -These are the variables used with different Pelican plugins, - -1. `SERIES_TITLE` used with [`multi_part` plugin](how-to-use-multi-part-plugin) -1. `SHARE_POST_INTRO` used with [`share_post` - plugin](how-to-use-social-sharing-plugin) -1. `RELATED_POSTS_LABEL` used with [`related_posts` - plugin](https://github.com/getpelican/pelican-plugins/tree/master/related_posts) - -These are the variables used for [Social Media -Optimization](search-engine-and-social-media-optimization#social-media-optimization-smo), - -1. `FEATURED_IMAGE` -1. `TWITTER_USERNAME` - -This site uses Elegant theme. You -can view its configuration files at -[Github](https://github.com/Pelican-Elegant/documentation) for inspiration. - -## Metadata - -Pelican uses [file -metadata](http://docs.getpelican.com/en/latest/getting_started.html#file-metadata) -from your articles and pages text files to get information about your posts, -like tags, authors etc. - -On top of _"official"_ metadata, Elegant uses some optional metadata that you -can use in your articles and pages. - -1. `summary` used for [Search Engine - Optimization](search-engine-and-social-media-optimization#search-engine-optimization-seo) -1. `subtitle` used to set [article - subtitle](elegant-best-pelican-theme-features#article-subtitle) -1. `keywords` used for [Search Engine - Optimization](search-engine-and-social-media-optimization#search-engine-optimization-seo) -1. `modified` used to set [last updated time](how-does-modified-metadata-works) - of the article -1. `series_title` used with [`multi_part` plugin](how-to-use-multi-part-plugin) -1. `featured_image` used for [Social Media - Optimization](search-engine-and-social-media-optimization#social-media-optimization-smo) -1. `comments_intro` used with - [comments](how-to-use-disqus-comments-elegantly#invite-visitors-to-comment) -1. `share_post_intro` used with [`share_post` - plugin](how-to-use-social-sharing-plugin) -1. `disqus_identifier` used with - [comments](how-to-use-disqus-comments-elegantly#disqus-thread-id) diff --git a/documentation/content/Elegant - Pelican Theme/customize-elegant.md b/documentation/content/Elegant - Pelican Theme/customize-elegant.md deleted file mode 100644 index 34e35be0..00000000 --- a/documentation/content/Elegant - Pelican Theme/customize-elegant.md +++ /dev/null @@ -1,123 +0,0 @@ -Title: How to Customize Elegant -Tags: pelican-theme, config -Category: Elegant - Pelican Theme -Date: 2014-03-24 14:05 -Slug: how-to-customize-elegant -Disqus_identifier: ale31i7-how-to-customize-elegant -Subtitle: -Summary: You can customize every aspect of Elegant without touching the source code -Keywords: - -[TOC] - -You can change Elegant's look, color palette, font, size, and even labels used -for widgets, sections and plugins. - -Elegant is best maintained when you treat it as a separate resource in your -project. Do not edit template files, JavaScript code and style sheets. This -practice will make upgrading Elegant fuss free process. - -Instead use following recommended ways. - -# Customize Style - -To customize Elegant's visual style, use -[`custom.css`](https://github.com/Pelican-Elegant/elegant/blob/master/static/css/custom.css). -You can override Elegant's visual style like font, color, spacing etc using -this sheet. This empty style sheet is present at following path in your Elegant -folder, - - :::bash - static/css/custom.css - -Find the code of the element you want to customize in -[`elegant.css`](https://github.com/Pelican-Elegant/elegant/blob/master/static/css/elegant.css). -Copy the element's selector and styles, and paste it in `custom.css`. Edit this -CSS code and customize it to your liking. - -Your customizations will override whatever rules are defined in `elegant.css`. - -Let's take a look how you can change the style of hyperlinks in an article. -Following is the relevant code, - - :::css - article p:not(#list-of-translations):not(#post-share-links) a, - article ol a, - article div.article-content ul:not(.articles-timeline):not(.related-posts-list) a { - - border-bottom: thin dashed #A9A9A9; - color: #000; - } - -Copy and paste it in `custom.css`. Change color to red for example, - - :::css - article p:not(#list-of-translations):not(#post-share-links) a, - article ol a, - article div.article-content ul:not(.articles-timeline):not(.related-posts-list) a { - - border-bottom: thin dashed #A9A9A9; - color: red; - } - -Test your website using Pelican. All links should be colored red. - -Read [this post](avoid-unnecessary-http-requests) to make sure your site's page -speed does not decrease due to additional HTTP request. - -# Change Syntax Highlight Theme - -Elegant uses [Solarized theme](http://ethanschoonover.com/solarized) for syntax -highlighting. To replace it, copy contents of your preferred theme's CSS style -sheet into `custom.css`. - -Alternatively, you can replace contents of `pygments.css` with your theme's -style sheet. - -If you feel like experimenting with different themes then [this -repository](https://github.com/uraimo/pygments-vimstyles) has Pygments CSS of -Vim themes. [This one](https://github.com/richleland/pygments-css) has Pygments -CSS of built-in styles. Do not forget to change `.codehilite` CSS class -identifier to `.highlight`. Code blocks in Pelican generated HTML use -`.highlight` class. - -# Change Labels - -It is quite possible you will feel the need to tweak labels of different -sections or widgets. For example, change label of [social -widget](/how-to-display-your-social-media-profiles) from "Contact" to "Stay in -Touch". - -Don't worry! We got you covered! - -Elegant has all the customizable variables in one place. [`_defaults.html` -file](https://github.com/Pelican-Elegant/elegant/blob/master/templates/_includes/_defaults.html). - - :::bash - templates/_includes/_defaults.html - -Let's see how can we change social widget label. - - #!jinja - {# Label for the list of social profiles #} - {% if not SOCIAL_PROFILE_LABEL %} - {% set SOCIAL_PROFILE_LABEL = 'Contact' %} - {% else %} - {% set SOCIAL_PROFILE_LABEL = SOCIAL_PROFILE_LABEL %} - {% endif %} - -Line 1, text enclosed in `{# #}` is a comment, which says this section is about -"Label for the list of social profiles". - -The text in all capital case `SOCIAL_PROFILE_LABEL` is the actual variable. - -Line 3 says `SOCIAL_PROFILE_LABEL` is set to `Contact`. - -To change this value, assign it a different value in your Pelican -configuration, `pelicanconf.py`. - - :::python - SOCIAL_PROFILE_LABEL = 'Stay in Touch' - -That's it. The title of social widget will change. There are several others -labels that you can customize easily without touching Elegant's source code. diff --git a/documentation/content/Elegant - Pelican Theme/elegant-theme.md b/documentation/content/Elegant - Pelican Theme/elegant-theme.md deleted file mode 100644 index 3043edf0..00000000 --- a/documentation/content/Elegant - Pelican Theme/elegant-theme.md +++ /dev/null @@ -1,309 +0,0 @@ -Title: Elegant -Subtitle: Why it is the best Pelican theme -Date: 2013-08-27 23:20 -Category: Elegant - Pelican Theme -Tags: jinja2, bootstrap, pelican-theme, font-awesome -Summary: Elegant is a minimal, stylish and responsive Pelican theme. Its unique features are search, Mailchimp, twitter card, and custom 404 page. -Slug: elegant-best-pelican-theme-features -comment_id: 2189d14-elegant-a-theme-for-pelican -modified: 2013-10-11 23:00 -keywords: pelican theme, responsive theme, tipue search - -[TOC] - -Elegant is a stylish, responsive, and minimal [Pelican](http://getpelican.com/) -theme that looks amazing across all screen resolutions and devices. - -Elegant gives meaning to the expression "sand the under side of the drawer." -Every feature and style of Elegant is the result of a long thought process. - -<div style="text-align:center;"> -<a class="btn btn-large btn-primary" onClick="_gaq.push(['_trackEvent', 'Outbound Link', 'Download on Github']);" href="https://github.com/Pelican-Elegant/elegant/archive/V1.3.zip" target="_blank">Get Elegant <small>1.3</small></a> -<div><a href="#license" title="License Agreement for using Elegant Theme"><small>License Agreement</small></a>|<a href="https://github.com/Pelican-Elegant/elegant/blob/master/RELEASE_NOTES.md#version-13" title="Release notes for Version 1.3" target="_blank"><small>Release Notes</small></a></div> -<div><p><a onClick="_gaq.push(['_trackEvent', 'Outbound Link', 'Leave a Tip']);" href="http://gittip.com/talha131" target="_blank" style="color:#8B0000"> <i class="fa fa-gittip"></i> Show your support. Leave a tip! <i class="fa fa-gittip"></i></a></p></div> -</div> - -What makes Elegant so special? - -## Search - -Static sites usually do not offer search. Elegant uses [Tipue -Search](http://www.tipue.com/search/)- an open source jQuery plugin, to offer -search for your static site. - -There are two search modes. - -1. **JSON Mode** Your site pages will be stored in JSON at your server. Tipue - Search will use AJAX to access it and render search result. You need [Tipue - Search plugin](https://github.com/getpelican/pelican-plugins) to use this - mode. -1. **Live Mode Search** Tipue Search will fetch your site using Sitemap, index - it and store it in the visitor's cache. This mode requires [Sitemap - plugin](https://github.com/getpelican/pelican-plugins). - -Use JSON mode if you value speed, or have a large site, or don't want to -overwhelm your host server for every search query. - -Here is how the search result looks like - -![Search result for App Store]({static}/images/elegant-theme_search-result.png) - -Search box is part of main navigation menu so that visitor can search from any -page. - -![Search box]({static}/images/elegant-theme_search-box.png) - -## Live Filter for Tags - -Elegant is a minimal theme. Instead of creating separate pages for each tag, -Elegant shows all the tags on a single page. To help visitor find the tags he -is interested in, Elegant offers live filter. - -Go to tags page and type your required tag in "Find a tag" search box. Elegant -will automatically filter the list. - -For example, this is how my tags page looks like - -![Tags view -unfiltered]({static}/images/elegant-theme_tags-live-filter-default.png) - -As soon as I type "os", all other tags are filtered out - -![Tags view filtered for -"os"]({static}/images/elegant-theme_tags-live-filter-filtered.png) - -With live filter, your reader will have no difficulty in picking up his desired -tag from the list, even if your site has hundreds of tags. - -## All Categories but with zero clutter - -Pelican by default creates a separate page for each category. Themes list all -the articles filed in that category at its page. Elegant takes a different -approach. - -It lists all the categories and their articles on the same page. To reduce -clutter and utilize space efficiently, each category and its list of articles -is enclosed in [collapsible -accordions](http://getbootstrap.com/2.3.2/javascript.html#collapse). - -Here is how categories appear collapsed - -![Categories accordions -collapsed]({static}/images/elegant-theme_category-accordions-collapsed.png) - -And this is how they appear uncollapsed - -![Categories accordions -uncollapsed]({static}/images/elegant-theme_category-accordions-uncollapsed.png) - -Did you notice that categories are listed in ascending alphabetical order and -articles are sorted by their date in descending order? - -## Home Page Features - -This is the page that visitors see when they open your website. Your chance to -make a good and lasting first impression. Most sites just display a list of -recent posts. Elegant goes the extra mile. Check this out - -![Home Page Sample]({static}/images/elegant-theme_home-page-features.png) - -You can see two sections here, - -1. About me -1. My Projects - -There is a third section below these two sections, "Recent articles" - -![Recent Articles Section]({static}/images/elegant-theme_recent-posts.png) - -### About me - -You can write up your own About me section using `LANDING_PAGE_ABOUT` variable -in your configuration. It is a dictionary that has two keys `title` and -`details`. Value of `title` is displayed in the header of the home page, like -in the above example it is "I design and build software products for iOS and -OSX". `details` is the text that appears under "About me" heading. - -### Projects - -Projects list is read from `PROJECTS`. It is an array of dictionaries. Each -dictionary has three keys, `name` which will have name of your project, `url` -which will have URL of the project, and `description` which will have the -description of the project. You can define as many projects as you want. Here -is an example, - - #!Python - PROJECTS = [{ - 'name': 'Logpad + Duration', - 'url': 'https://github.com/talha131/logpad-plus-duration#logpad--duration', - 'description': 'Vim plugin to emulate Windows Notepad logging feature,' - ' and log duration of each entry'}, - {'name': 'Elegant Theme for Pelican', - 'url': 'http://oncrashreboot.com/pelican-elegant', - 'description': 'A clean and distraction free theme, with search and a' - ' lot more unique features, using Jinja2 and Bootstrap'}] - -### Recent Articles - -Recent articles show last `RECENT_ARTICLES_COUNT` whose default value is 10. It -also has a link to "all posts". - -## Mailchimp - -Mailchimp has become the preferred newsletter service. Elegant shows a form to -subscribe to your newsletter, above the fold, in the right section of every -article. Increased visibility is said to increase number of subscribers. - -![Mailchimp subscriber -form]({static}/images/elegant-theme_subscribe-form.png) - -You need to put your Mailchimp form action URL in `MAILCHIMP_FORM_ACTION` in -your configuration file. You can also define `EMAIL_SUBSCRIPTION_LABEL`, -`EMAIL_FIELD_PLACEHOLDER` and `SUBSCRIBE_BUTTON_TITLE` to customize user -experience. - -## Collapsible Comments - -Readers use scroll bar to track their progress when reading inside their -browsers. Very often comments take up more space than the actual article. When -comments take up more space, it throws the scroll bar proportion off and reader -cannot judge his progress correctly. Hacker News hosted [a -discussion](https://news.ycombinator.com/item?id=6246777) on this topic. - -> tons of online articles list comments on the same page, so the scroll bar is -> almost a negative incentive to keep reading. "I've read this much of the -> article and I'm only 1/20th of the way down?" -> [user stops reading, unaware that there's 450 comments and the article is actually pretty short] - -Elegant keeps the comments section hidden by default. Reader can hide and -unhide the section by clicking on the comments section. - -This is how comments section appear - -![Collapsed comments -section]({static}/images/elegant-theme_comments-section-collapsed.png) - -It expands when reader clicks on it - -![Uncollapsed comments -section]({static}/images/elegant-theme_comments-section-uncollapsed.png) - -## Articles Count with every Tag and Category - -Readers of an article on your site usually look for other articles on the same -topic. Categories and tags are a way of showing them related articles. Elegant -displays the count of articles that you have written in a category or tag in a -non-intrusive manner. - -Every category and tag has the count of articles in superscript. So if you have -written three articles in the C++ category or tag, it will have 3 in the -superscript. This way visitor will know you have written other articles too on -the same topic. - -Check out the screenshots, - -![Count of articles in a category is displayed in -superscript]({static}/images/elegant-theme_category-superscript-count.png) - -![Count of articles that have been tagged is displayed in -superscript]({static}/images/elegant-theme_tag-superscript-count.png) - -## Custom 404 Page - -Elegant has a custom Error 404 page for your readers. - -![Error 404 page]({static}/images/elegant-theme_error-404-page.png) - -## Page Title - -Elegant follows following format for the `<title>` tag - -``` -Article title · Site Name -``` - -![Article title is always visible in the -tab]({static}/images/elegant-theme_page-title.png) - -Some sites put site title first and article title later in the `<title>` tag. -There is a problem with this approach. When you open too many tabs, browser -delimits tab's title from the end. In such cases, only the first few words or -even letters of the `<title>` are left visible. - -If visitor has opened several tabs from your website, all tabs will have "Site -Name..." title. User will need to click on each tab to identify his required -tab from the content. But with Elegant's approach article title will always be -visible, and reader will have less difficultly in identifying the tab he is -after. - -Putting site title before the article title increases your site name -visibility. Elegant achieves this by putting site name in the top navigation -bar of every page, where it always stays above the fold. - -## Code Style - -Elegant uses [Solarized](http://ethanschoonover.com/solarized) theme for syntax -highlighting. Line numbers have a different background color so that they -appear distinct from the code. Here is an example - - #!c - int sample_function (void) { - printf ("This is a sample function"); - return 0 - } - -## Article Subtitle - -Pelican lets you define title of your article in the meta data. Elegant adds -subtitle support. Just define `subtitle` in your article's meta data and it -will appear along with your title. Here is an example, - -![Article subtitle -example]({static}/images/elegant-theme_article-subtitle.png) - -Article subtitle is displayed with the title in every list. To keep it visibly -separate from title, subtitle is enclosed in `<small>` tag. When visible cue -cannot be used, like in the title attribute of HTML anchor tag `<a>`, a hyphen -is inserted between them. - -![Article title and subtitle separated with a -hyphen]({static}/images/elegant-theme_article-subtitle-hyphen.png) - ---- - -## Elegant - Technical Nitty-Gritty - -### License - -The license requires that you give credit to me, Talha Mansoor, as the author -of the Elegant theme on every site that uses this theme. I have placed the -attribution in the footer of every page. Do not remove it. If you need to -remove or change the style of the attribution, please get in [touch with -me](http://oncrashreboot.com/#about-me) first. - -Along with this attribution clause, Elegant theme is licensed under The MIT -License. - -If you use my theme, I would love to hear from you. [Get in -touch](http://oncrashreboot.com/#about-me) and let me know about it. I may link -to your site too. - -### Contribute - -Front end design is not my strong suite. I must have made some blunders in this -design unknowingly. Please don't let me go away with buggy code. - -- File bugs at [Github - issues](https://github.com/Pelican-Elegant/elegant/issues) -- Share your ideas about the design in the comments below -- And most of all contribute improvements to [this - project](https://github.com/Pelican-Elegant/elegant/) - -There are two problem areas that I can think of, - -1. Internet Explorer support -1. Web safe fonts. I developed this theme on a MacBook Retina. Although I have - tried to make sure it looks great on all platforms but it still needs polish - -Besides these, there must be other bugs that I haven't noticed yet. I need your -help to hunt them down and make them behave. diff --git a/documentation/content/Elegant - Pelican Theme/favicons-speed-dial-icons.md b/documentation/content/Elegant - Pelican Theme/favicons-speed-dial-icons.md index ee6aded3..26080f38 100644 --- a/documentation/content/Elegant - Pelican Theme/favicons-speed-dial-icons.md +++ b/documentation/content/Elegant - Pelican Theme/favicons-speed-dial-icons.md @@ -1,3 +1,4 @@ +--- Title: How to set Shortcut Icons Tags: pelican-theme, web-design Category: Elegant - Pelican Theme @@ -7,6 +8,8 @@ Disqus_identifier: x0giyfl-how-to-set-shortcut-icons Subtitle: Summary: Elegant lets you set Favicon, Opera Speed Dial icon, and shortcut icons for Apple iOS and Android devices. Keywords: +authors: Talha Mansoor +--- Elegant supports Favicon, Opera Speed Dial, and shortcut or launcher icons on Apple iOS and Android devices. These are disabled by default to avoid diff --git a/documentation/content/Elegant - Pelican Theme/misc-features.md b/documentation/content/Elegant - Pelican Theme/misc-features.md deleted file mode 100644 index 388261ec..00000000 --- a/documentation/content/Elegant - Pelican Theme/misc-features.md +++ /dev/null @@ -1,35 +0,0 @@ -Title: Few more features of Elegant -Tags: pelican-theme, web-design -Category: Elegant - Pelican Theme -Date: 2014-04-22 16:23 -Slug: few-more-features-of-elegant -Disqus_identifier: c8et6bu-few-more-features-of-elegant -Subtitle: -Summary: Three more features that are unique to Elegant theme -Keywords: - -[TOC] - -Here are few more features that make Elegant a unique and powerful theme for -Pelican powered blogs. - -## Add License to your Site - -You can put your license string in `SITE_LICENSE`. It will appear in the footer -of every page of your site. Here is how license of my site looks like, - -![onCrashReboot site license]({static}/images/elegant-theme_license.png) - -## Site Subtitle - -You can also define `SITE_SUBTITLE`, it appears in the footer, before site -license. - -![Site subtitle]({static}/images/elegant-theme_site-subtitle.png) - -## Web Safe Fonts - -Elegant uses commonly available typefaces in every style rule. It has a list of -closely matching fonts in the fallback list. For examples Baskerville is the -first choice for headings. But if reader does not have Baskerville installed, -Garamond will be used. If that too fails then Georgia will be used. diff --git a/documentation/content/Elegant - Pelican Theme/testimonials.md b/documentation/content/Elegant - Pelican Theme/testimonials.md index 703f6920..dd847b29 100644 --- a/documentation/content/Elegant - Pelican Theme/testimonials.md +++ b/documentation/content/Elegant - Pelican Theme/testimonials.md @@ -1,3 +1,4 @@ +--- Title: What People Say About Elegant Tags: pelican-theme, testimonials Category: Elegant - Pelican Theme @@ -7,6 +8,8 @@ Disqus_identifier: qryv67o-what-people-say-about-elegant Subtitle: Summary: Keywords: +authors: Talha Mansoor +--- > Thanks for this amazing project. diff --git a/documentation/content/Extra Customization/change-labels.md b/documentation/content/Extra Customization/change-labels.md new file mode 100644 index 00000000..27b7242a --- /dev/null +++ b/documentation/content/Extra Customization/change-labels.md @@ -0,0 +1,47 @@ +--- +authors: Talha Mansoor +Title: Change Labels +Tags: unique +Date: 2019-07-03 20:20 +Slug: change-labels +Category: Extra Customization +--- + +It is quite possible you will feel the need to tweak labels of different +sections or widgets. For example, change label of [social +widget](/how-to-display-your-social-media-profiles) from "Contact" to "Stay in +Touch". + +Don't worry! We got you covered! + +Elegant has all the customizable variables in one place. [`_defaults.html` +file](https://github.com/Pelican-Elegant/elegant/blob/master/templates/_includes/_defaults.html). + + :::bash + templates/_includes/_defaults.html + +Let's see how can we change social widget label. + + #!jinja + {# Label for the list of social profiles #} + {% if not SOCIAL_PROFILE_LABEL %} + {% set SOCIAL_PROFILE_LABEL = 'Contact' %} + {% else %} + {% set SOCIAL_PROFILE_LABEL = SOCIAL_PROFILE_LABEL %} + {% endif %} + +Line 1, text enclosed in `{# #}` is a comment, which says this section is about +"Label for the list of social profiles". + +The text in all capital case `SOCIAL_PROFILE_LABEL` is the actual variable. + +Line 3 says `SOCIAL_PROFILE_LABEL` is set to `Contact`. + +To change this value, assign it a different value in your Pelican +configuration, `pelicanconf.py`. + + :::python + SOCIAL_PROFILE_LABEL = 'Stay in Touch' + +That's it. The title of social widget will change. There are several others +labels that you can customize easily without touching Elegant's source code. diff --git a/documentation/content/Extra Customization/custom-404.md b/documentation/content/Extra Customization/custom-404.md new file mode 100644 index 00000000..f48ed6d3 --- /dev/null +++ b/documentation/content/Extra Customization/custom-404.md @@ -0,0 +1,19 @@ +--- +authors: Talha Mansoor +Title: Custom 404 Page +Tags: unique +Date: 2019-07-03 20:07 +Slug: custom-404-page +Summary: Elegant has a custom 404 page +Category: Extra Customization +--- + +Elegant has a custom Error 404 page for your readers. + +![Error 404 page]({static}/images/elegant-theme_error-404-page.png) + +To enable, add `404` to your `DIRECT_TEMPLATES` in pelican configuration. + +```python +DIRECT_TEMPLATES = (('index', 'tags', 'categories','archives', '404')) +``` diff --git a/documentation/content/Extra Customization/custom-style.md b/documentation/content/Extra Customization/custom-style.md new file mode 100644 index 00000000..b8297745 --- /dev/null +++ b/documentation/content/Extra Customization/custom-style.md @@ -0,0 +1,52 @@ +--- +authors: Talha Mansoor +Title: Customize Style +Tags: unique +Date: 2019-07-03 20:14 +Slug: customize-style +Category: Extra Customization +--- + +To customize Elegant's visual style, use +[`custom.css`](https://github.com/Pelican-Elegant/elegant/blob/master/static/css/custom.css). +You can override Elegant's visual style like font, color, spacing etc using +this sheet. This empty style sheet is present at following path in your Elegant +folder, + + :::bash + static/css/custom.css + +Find the code of the element you want to customize in +[`elegant.css`](https://github.com/Pelican-Elegant/elegant/blob/master/static/css/elegant.css). +Copy the element's selector and styles, and paste it in `custom.css`. Edit this +CSS code and customize it to your liking. + +Your customizations will override whatever rules are defined in `elegant.css`. + +Let's take a look how you can change the style of hyperlinks in an article. +Following is the relevant code, + + :::css + article p:not(#list-of-translations):not(#post-share-links) a, + article ol a, + article div.article-content ul:not(.articles-timeline):not(.related-posts-list) a { + + border-bottom: thin dashed #A9A9A9; + color: #000; + } + +Copy and paste it in `custom.css`. Change color to red for example, + + :::css + article p:not(#list-of-translations):not(#post-share-links) a, + article ol a, + article div.article-content ul:not(.articles-timeline):not(.related-posts-list) a { + + border-bottom: thin dashed #A9A9A9; + color: red; + } + +Test your website using Pelican. All links should be colored red. + +Read [this post]({filename}../Supported Plugins/assets-plugin.md) to make sure your site's page +speed does not decrease due to additional HTTP request. diff --git a/documentation/content/Extra Customization/customize-elegant.md b/documentation/content/Extra Customization/customize-elegant.md new file mode 100644 index 00000000..b03e9b07 --- /dev/null +++ b/documentation/content/Extra Customization/customize-elegant.md @@ -0,0 +1,23 @@ +--- +Title: How to Customize Elegant +Tags: config +Category: Extra Customization +Date: 2014-03-24 14:05 +Slug: how-to-customize-elegant +Disqus_identifier: ale31i7-how-to-customize-elegant +Subtitle: +Summary: You can customize every aspect of Elegant without touching the source code +Keywords: +authors: Talha Mansoor +--- + +[TOC] + +You can change Elegant's look, color palette, font, size, and even labels used +for widgets, sections and plugins. + +Elegant is best maintained when you treat it as a separate resource in your +project. Do not edit template files, JavaScript code and style sheets. This +practice will make upgrading Elegant fuss free process. + +Instead see the guides in ["Extra Customization" category](categories.html#extra-customization-ref). diff --git a/documentation/content/Extra Customization/meta-data.md b/documentation/content/Extra Customization/meta-data.md new file mode 100644 index 00000000..a12043d7 --- /dev/null +++ b/documentation/content/Extra Customization/meta-data.md @@ -0,0 +1,34 @@ +--- +authors: Talha Mansoor +Title: Metadata +Tags: unique +Date: 2019-07-03 20:44 +Slug: metadata +Category: Extra Customization +--- + +Pelican uses [file +metadata](http://docs.getpelican.com/en/latest/getting_started.html#file-metadata) +from your articles and pages text files to get information about your posts, +like tags, authors etc. + +On top of _"official"_ metadata, Elegant uses some optional metadata that you +can use in your articles and pages. + +1. `summary` used for [Search Engine + Optimization](search-engine-and-social-media-optimization#search-engine-optimization-seo) +1. `subtitle` used to set [article + subtitle]({filename}../Appearance and Style/article-subtitle.md) +1. `keywords` used for [Search Engine + Optimization](search-engine-and-social-media-optimization#search-engine-optimization-seo) +1. `modified` used to set [last updated time](how-does-modified-metadata-works) + of the article +1. `series_title` used with [`multi_part` plugin](how-to-use-multi-part-plugin) +1. `featured_image` used for [Social Media + Optimization](search-engine-and-social-media-optimization#social-media-optimization-smo) +1. `share_post_intro` used with [`share_post` + plugin](how-to-use-social-sharing-plugin) +1. `comments_intro` used with + [comments]({filename}../Comments/invite-comments.md) +1. `comment_id` used with + [comments]({filename}../Comments/comment-id.md) diff --git a/documentation/content/Footer/add-license.md b/documentation/content/Footer/add-license.md new file mode 100644 index 00000000..ff8c12c9 --- /dev/null +++ b/documentation/content/Footer/add-license.md @@ -0,0 +1,23 @@ +--- +Title: Add License to your Site +Tags: nuances +Category: Footer +Date: 2014-04-22 16:23 +Slug: add-license-to-your-site +Summary: You can display your preferred license in the footer +authors: Talha Mansoor +--- + +You can optionally define `SITE_LICENSE` variable in Pelican configuration. It will appear in the footer of the site. + +For example, + +```python +SITE_LICENSE = """Content licensed under <a rel="license" + href="http://creativecommons.org/licenses/by/4.0/" target="_blank"> + Creative Commons Attribution 4.0 International License</a>.""" +``` + +It appears as + +![Site License Demonstration]({static}/images/elegant-theme_license.png) diff --git a/documentation/content/Footer/hosted-on.md b/documentation/content/Footer/hosted-on.md new file mode 100644 index 00000000..619c753f --- /dev/null +++ b/documentation/content/Footer/hosted-on.md @@ -0,0 +1,33 @@ +--- +Title: Show Your Host Information +authors: Talha Mansoor +Tags: nuances +layout: post +date: 2019-06-30 11:54 +comments: false +Slug: show-host-information +Summary: Show the host of your website +Category: Footer +--- + +You can optionally display the host of your website in the footer. + +To do so, define a dictionary `HOSTED_ON` in your Pelican configuration. It has two keys, + +1. `name`: mandatory. Value type is string +1. `url`: optional. Value type is string + +For example, + +```python +HOSTED_ON = { + "name": "Netlify", + "url": "https://www.netlify.com/" + } +``` + +It will appear in the footer as + +![Demonstration of HOSTED_ON variable]({static}/images/hosted-on.png) + +If `url` is present then Elegant will add link to your host in the footer with `nofollow` attribute. Otherwise Elegant will display the name without any link. diff --git a/documentation/content/Footer/site-subtitle.md b/documentation/content/Footer/site-subtitle.md new file mode 100644 index 00000000..fb757f8e --- /dev/null +++ b/documentation/content/Footer/site-subtitle.md @@ -0,0 +1,21 @@ +--- +Title: Add Site Subtitle +Tags: nuances +Category: Footer +Date: 2014-04-22 16:23 +Slug: add-site-subtitle +Summary: You can add and display a site subtitle +authors: Talha Mansoor +--- + +You can optionally define `SITE_SUBTITLE` variable in Pelican configuration. It will appear in the footer of the site. + +For example, + +```python +SITESUBTITLE = "You can, you should, and if you're brave enough to start, you will." +``` + +It appears in the footer as + +![Site subtitle]({static}/images/elegant-theme_site-subtitle.png) diff --git a/documentation/content/Landing Page/about-me.md b/documentation/content/Landing Page/about-me.md new file mode 100644 index 00000000..09175a04 --- /dev/null +++ b/documentation/content/Landing Page/about-me.md @@ -0,0 +1,46 @@ +--- +authors: Talha Mansoor +Title: Write About Me +Tags: remarkable, unique, home +layout: post +Date: 2019-07-01 01:12 +comments: false +Slug: write-about-me +Category: Landing Page +--- + +To write about me section, create a page. See [Pelican documentation](http://docs.getpelican.com/en/stable/content.html#pages) on how to create a page. + +The slug of the page should be `landing-page-about-hidden` and `status` should be `hidden`. Example, + +```yaml +--- +author: Talha Mansoor +title: What Is Elegant +layout: page +date: 2019-01-14 7:30:47 +0100 +status: hidden +slug: landing-page-about-hidden +--- + +``` + +The content of this will become your "About me" section, and title will become the heading. You can write content in any markup language, like Markdown, AsciiDoc or reST, as long as Pelican has supports it. + +![Home Page Sample]({static}/images/elegant-theme_home-page-features.png) + +### Deprecated + +!!! Danger "Warning: Legacy Variable" + + `LANDING_PAGE_ABOUT` was available in Elegant V2.5.0. It has since been passed out in favour of `landing-page-about-hidden`. The new method lets you write "About Me" in your favourite markup language. + +You can write up your own About me section using `LANDING_PAGE_ABOUT` variable +in your configuration. It is a dictionary that has two keys `title` and +`details`. + +Value of `title` is displayed in the header of the home page, like +in the above example it is "I design and build software products for iOS and +OSX". + +`details` is the text that appears under "About me" heading. You can add raw HTML to it. diff --git a/documentation/content/Landing Page/landing-page.md b/documentation/content/Landing Page/landing-page.md new file mode 100644 index 00000000..2a1293b2 --- /dev/null +++ b/documentation/content/Landing Page/landing-page.md @@ -0,0 +1,35 @@ +--- +authors: Talha Mansoor +Title: Unique Home Page Features +Tags: home, remarkable, unique, guide +layout: post +Date: 2019-07-31 01:22 +comments: false +Slug: unique-home-page-features +Category: Landing Page +--- + +This is the page that visitors see when they open your website. Your chance to +make a good and lasting first impression. Most sites just display a list of +recent posts. Elegant goes the extra mile. Check this out + +![Home Page Sample]({static}/images/elegant-theme_home-page-features.png) + +You can see three features here, + +1. Welcome Heading +1. About me +1. My Projects + +There is a third section below these two sections, "Recent articles". + +![Recent Articles Section]({static}/images/elegant-theme_recent-posts.png) + +## How to set them up + +We have detailed help articles to help you set these sections up + +1. [Write Welcome Message]({filename}./welcome.md) +1. [Write About Me]({filename}./about-me.md) +1. [Projects List]({filename}./projects-list.md) +1. [Recent Articles List]({filename}./recent-articles.md) diff --git a/documentation/content/Landing Page/projects-list.md b/documentation/content/Landing Page/projects-list.md new file mode 100644 index 00000000..3097296d --- /dev/null +++ b/documentation/content/Landing Page/projects-list.md @@ -0,0 +1,39 @@ +--- +authors: Talha Mansoor +Title: Projects List +Tags: remarkable, unique, home +layout: post +Date: 2019-07-01 01:12 +comments: false +Slug: projects-list +Category: Landing Page +--- + +Projects list is read from `PROJECTS`. It is an array of dictionaries. Each +dictionary has three keys, + +1. `name` which will have name of your project, +1. `url` which will have URL of the project, and +1. `description` which will have the description of the project. + +You can define as many projects as you want. Here +is an example, + + #!Python + PROJECTS = [{ + 'name': 'Logpad + Duration', + 'url': 'https://github.com/talha131/logpad-plus-duration#logpad--duration', + 'description': 'Vim plugin to emulate Windows Notepad logging feature,' + ' and log duration of each entry'}, + {'name': 'Elegant Theme for Pelican', + 'url': 'http://oncrashreboot.com/pelican-elegant', + 'description': 'A clean and distraction free theme, with search and a' + ' lot more unique features, using Jinja2 and Bootstrap'}] + +To configure the projects' list title, set `PROJECTS_TITLE` variable in your Pelican configuration. Its default value is "My Projects". For example, + +```python +PROJECTS_TITLE = "Related Projects" +``` + +![Home Page Sample]({static}/images/elegant-theme_home-page-features.png) diff --git a/documentation/content/Landing Page/recent-articles.md b/documentation/content/Landing Page/recent-articles.md new file mode 100644 index 00000000..5ed1bd38 --- /dev/null +++ b/documentation/content/Landing Page/recent-articles.md @@ -0,0 +1,16 @@ +--- +authors: Talha Mansoor +Title: Recent Articles List +Tags: remarkable, unique, home +layout: post +Date: 2019-07-01 01:10 +comments: false +Slug: recent-articles-list +Category: Landing Page +--- + +Recent articles show last `RECENT_ARTICLES_COUNT` whose default value is 10. + +It also has a link to "all posts", which takes user to the archives page. + +![Recent Articles Section]({static}/images/elegant-theme_recent-posts.png) diff --git a/documentation/content/Landing Page/welcome.md b/documentation/content/Landing Page/welcome.md new file mode 100644 index 00000000..8222f4f2 --- /dev/null +++ b/documentation/content/Landing Page/welcome.md @@ -0,0 +1,18 @@ +--- +authors: Talha Mansoor +Title: Write Welcome Message +Tags: remarkable, unique, home +layout: post +Date: 2019-07-01 01:12 +comments: false +Slug: write-welcome-message +Category: Landing Page +--- + +Define `LANDING_PAGE_TITLE` in your Pelican configuration. It will be displayed as the welcome heading. For example, + +```python +LANDING_PAGE_TITLE = "I design and build software products for iOS and OSX" +``` + +![Home Page Sample]({static}/images/elegant-theme_home-page-features.png) diff --git a/documentation/content/Mailing List/freelists.md b/documentation/content/Mailing List/freelists.md new file mode 100644 index 00000000..c94e11a0 --- /dev/null +++ b/documentation/content/Mailing List/freelists.md @@ -0,0 +1,28 @@ +--- +Title: Add FreeLists +Tags: marketing, network, subscriber +layout: post +Date: 2018-07-05 23:20 +comments: false +Slug: add-freelists +Category: Mailing List +authors: Talha Mansoor +--- + +Elegant shows a form to subscribe to your newsletter, above the fold, in the right section of every article. + +You need to put your FreeLists name in `FREELISTS_NAME` in your configuration file. + +To customize user experience you can also define, + +1. `EMAIL_SUBSCRIPTION_LABEL`, +1. `EMAIL_FIELD_PLACEHOLDER` and +1. `SUBSCRIBE_BUTTON_TITLE` + +!!! Warning + + FreeLists has deprecated the form Elegant used. Due to which, + user is redireced to FreeLists [deprecation notice page](https://www.freelists.org/cgi-bin/subscription.cgi). + If your `FREELISTS_NAME` is correct then their notice page has a link to their new form. + + Fixing this issue is on our roadmap. You can track it [here](https://github.com/Pelican-Elegant/elegant/issues/412). diff --git a/documentation/content/Mailing List/mailchimp.md b/documentation/content/Mailing List/mailchimp.md new file mode 100644 index 00000000..a8798f08 --- /dev/null +++ b/documentation/content/Mailing List/mailchimp.md @@ -0,0 +1,23 @@ +--- +Title: Add Mailchimp +Tags: marketing, network, subscriber +layout: post +Date: 2013-08-27 23:20 +comments: false +Slug: add-mailchimp +Category: Mailing List +authors: Talha Mansoor +--- + +Elegant shows a form to subscribe to your newsletter, above the fold, in the right section of every article. Increased visibility is said to increase number of subscribers. + +![Mailchimp subscriber +form]({static}/images/elegant-theme_subscribe-form.png) + +You need to put your Mailchimp form action URL in `MAILCHIMP_FORM_ACTION` in your configuration file. + +To customize user experience you can also define, + +1. `EMAIL_SUBSCRIPTION_LABEL`, +1. `EMAIL_FIELD_PLACEHOLDER` and +1. `SUBSCRIBE_BUTTON_TITLE` diff --git a/documentation/content/Monetization/amazon-one-link.md b/documentation/content/Monetization/amazon-one-link.md index 53f87298..42394eec 100644 --- a/documentation/content/Monetization/amazon-one-link.md +++ b/documentation/content/Monetization/amazon-one-link.md @@ -1,5 +1,5 @@ --- -author: Pablo Iranzo Gómez (pablo.iranzo@gmail.com) +authors: Pablo Iranzo Gómez, Talha Mansoor title: Amazon OneLink Support tags: amazon, affiliates, income layout: post @@ -45,4 +45,4 @@ Amazon Associates states that you need to disclose your affiliation with Amazon To conform to this rule in the agreement, Elegant automatically adds the disclaimer in the footer of the website if `AMAZON_ONELINK` variable is set. It looks like this, -![]({static}/images/amazon-online-disclaimer.png) +![Amazon OneLink Disclosure]({static}/images/amazon-online-disclaimer.png) diff --git a/documentation/content/Release Notes/release-notes-2.0.0.md b/documentation/content/Release Notes/release-notes-2.0.0.md index 1936a231..509caa83 100644 --- a/documentation/content/Release Notes/release-notes-2.0.0.md +++ b/documentation/content/Release Notes/release-notes-2.0.0.md @@ -2,7 +2,7 @@ Title: Version 2.0.0 Tags: change-log, project-management layout: post -date: 2019-02-09 00:59 +date: 2019-02-10 05:59 comments: false Slug: elegant-2-0-0-release-notes Summary: Big improvements on all fronts – loads of bug fixes, improved W3C conformance, a community development model, and a new website. @@ -17,7 +17,7 @@ With more than 4 years in the making, this release started "better late then nev With the [community spark re-ignited][announcement_community], this has become the biggest release since probably 1.0. And as such a very worthy release to carry the 2.0 crown. -[announcement_community]: {filename}../Announcements/community-driven-project.md +[announcement_community]: {filename}../Contributing/community-driven-project.md # Elegant v 2.0 is finally here! diff --git a/documentation/content/Release Notes/release-notes-2.1.0.md b/documentation/content/Release Notes/release-notes-2.1.0.md index 3693365d..fae20192 100644 --- a/documentation/content/Release Notes/release-notes-2.1.0.md +++ b/documentation/content/Release Notes/release-notes-2.1.0.md @@ -2,7 +2,7 @@ Title: Version 2.1.0 Tags: change-log, project-management layout: post -date: 2018-02-10 11:34 +date: 2019-02-10 11:34 comments: false Slug: version-2-1-0-release-notes Summary: Add new features and updates diff --git a/documentation/content/Elegant - Pelican Theme/claimsite.md b/documentation/content/SEO and SMO/claim-site.md similarity index 90% rename from documentation/content/Elegant - Pelican Theme/claimsite.md rename to documentation/content/SEO and SMO/claim-site.md index 0d0690db..cbb267f2 100644 --- a/documentation/content/Elegant - Pelican Theme/claimsite.md +++ b/documentation/content/SEO and SMO/claim-site.md @@ -1,12 +1,12 @@ --- Title: Claim website on Google and Bing -Tags: pelican-theme, pelican-plugin, claim -Category: Elegant - Pelican Theme +Tags: google, bing, crawler +Category: SEO & SMO Date: 2019-06-27 Slug: website-claim Disqus_identifier: hk9m5eq-website-claim Subtitle: -Summary: Use Pelican to insert headers to claim website +Summary: Easily insert headers to claim website Keywords: --- diff --git a/documentation/content/Building Readership/rss-feeds.md b/documentation/content/SEO and SMO/rss-feeds.md similarity index 97% rename from documentation/content/Building Readership/rss-feeds.md rename to documentation/content/SEO and SMO/rss-feeds.md index e47a4149..6e9515e8 100644 --- a/documentation/content/Building Readership/rss-feeds.md +++ b/documentation/content/SEO and SMO/rss-feeds.md @@ -1,12 +1,15 @@ +--- Title: How to show RSS feeds icon Tags: pelican-theme, font-awesome, web-design -Category: Building Readership +Category: SEO & SMO Date: 2014-03-17 15:28 Slug: how-to-show-rss-feeds-icon Disqus_identifier: ijvxwtg-how-to-show-rss-feeds-icon Subtitle: Summary: Elegant supports RSS and Atom feeds for your posts, categories and tags Keywords: +authors: Talha Mansoor +--- RSS feeds is the oldest and arguably the most used format to publish blog updates. Its use is not limited to RSS aggregators and readers. Tools like diff --git a/documentation/content/Building Readership/seo-social-media-tags.md b/documentation/content/SEO and SMO/seo-social-media-tags.md similarity index 97% rename from documentation/content/Building Readership/seo-social-media-tags.md rename to documentation/content/SEO and SMO/seo-social-media-tags.md index ad4e7cd5..2d94f57f 100644 --- a/documentation/content/Building Readership/seo-social-media-tags.md +++ b/documentation/content/SEO and SMO/seo-social-media-tags.md @@ -1,11 +1,14 @@ +--- Title: Search Engine and Social Media Optimization -Tags: pelican-theme, social-media, web-analytics -Category: Building Readership +Tags: crawler, social-media, web-analytics +Category: SEO & SMO Date: 2014-04-20 16:31 Slug: search-engine-and-social-media-optimization Disqus_identifier: 7mh4xjn-search-engine-and-social-media-optimization Summary: Keywords: +authors: Talha Mansoor +--- [TOC] diff --git a/documentation/content/Building Readership/social-profiles-sidebar.md b/documentation/content/SEO and SMO/social-profiles-sidebar.md similarity index 98% rename from documentation/content/Building Readership/social-profiles-sidebar.md rename to documentation/content/SEO and SMO/social-profiles-sidebar.md index f972b034..65966588 100644 --- a/documentation/content/Building Readership/social-profiles-sidebar.md +++ b/documentation/content/SEO and SMO/social-profiles-sidebar.md @@ -1,12 +1,15 @@ +--- Title: How to display your Social Media Profiles Tags: pelican-theme, font-awesome, social-media, web-design -Category: Building Readership +Category: SEO & SMO Date: 2014-01-27 00:28 Slug: how-to-display-your-social-media-profiles Disqus_identifier: k7fpj4y-how-to-display-your-social-media-profiles Subtitle: Summary: Elegant displays links to your social media profiles in sidebar in a customizable manner Keywords: +authors: Talha Mansoor +--- Bloggers use different tools to connect with their readers, engage in discussion with them, and create a loyal following of fans. These tools range diff --git a/documentation/content/Search/tipue-search.md b/documentation/content/Search/tipue-search.md new file mode 100644 index 00000000..3daa6a86 --- /dev/null +++ b/documentation/content/Search/tipue-search.md @@ -0,0 +1,31 @@ +--- +authors: Talha Mansoor +Title: Add Search to your Site +Tags: unique +Date: 2019-07-03 19:56 +Slug: add-tipue-search +Summary: Elegant lets you add search to your static site +Category: Search +--- + +Static sites usually do not offer search. Elegant uses [Tipue +Search](http://www.tipue.com/search/)- an open source jQuery plugin, to offer +search for your static site. + +Here is how the search result looks like + +![Search result for App Store]({static}/images/elegant-theme_search-result.png) + +Search box is part of main navigation menu so that visitor can search from any +page. + +![Search box]({static}/images/elegant-theme_search-box.png) + +## Configuration + +To enable search, you need to enable `tipue_search` plugin and add `search` to `DIRECT_TEMPLATES` in your pelican configuration + +```python +PLUGINS = [tipue_search'] +DIRECT_TEMPLATES = (('index', 'tags', 'categories','archives', 'search')) +``` diff --git a/documentation/content/Supported Plugins/photogallery.md b/documentation/content/Supported Plugins/photogallery.md index 338dc122..1d984c0f 100644 --- a/documentation/content/Supported Plugins/photogallery.md +++ b/documentation/content/Supported Plugins/photogallery.md @@ -80,4 +80,4 @@ The `photos` plugin will process the images, resize, include the watermark, etc This is an example of the final result: -![]({static}../images/photogallery.png) +![Photo Gallery Demonstration]({static}../images/photogallery.png) diff --git a/documentation/content/Taxonomy/article-count.md b/documentation/content/Taxonomy/article-count.md new file mode 100644 index 00000000..286b724e --- /dev/null +++ b/documentation/content/Taxonomy/article-count.md @@ -0,0 +1,28 @@ +--- +Title: Articles Count With Every Tag & Category +authors: Talha Mansoor +Tags: nuances +layout: post +Date: 2013-08-27 23:20 +comments: false +Slug: articles-count-with-every-tag-and-category +Category: Taxonomy +--- + +Readers of an article on your site usually look for other articles on the same +topic. Categories and tags are a way of showing them related articles. Elegant +displays the count of articles that you have written in a category or tag in a +non-intrusive manner. + +Every category and tag has the count of articles in superscript. So if you have +written three articles in the C++ category or tag, it will have 3 in the +superscript. This way visitor will know you have written other articles too on +the same topic. + +Check out the screenshots, + +![Count of articles in a category is displayed in +superscript]({static}/images/elegant-theme_category-superscript-count.png) + +![Count of articles that have been tagged is displayed in +superscript]({static}/images/elegant-theme_tag-superscript-count.png) diff --git a/documentation/content/Taxonomy/filter-tags.md b/documentation/content/Taxonomy/filter-tags.md new file mode 100644 index 00000000..8de7696f --- /dev/null +++ b/documentation/content/Taxonomy/filter-tags.md @@ -0,0 +1,30 @@ +--- +authors: Talha Mansoor +Title: Live Filter for Tags +Tags: nuances, search +layout: post +Date: 2013-08-27 23:20 +comments: false +Slug: live-filter-for-tags +Category: Taxonomy +--- + +Elegant is a minimal theme. Instead of creating separate pages for each tag, +Elegant shows all the tags on a single page. To help visitor find the tags he +is interested in, Elegant offers live filter. + +Go to tags page and type your required tag in "Find a tag" search box. Elegant +will automatically filter the list. + +For example, this is how my tags page looks like + +![Tags view +unfiltered]({static}/images/elegant-theme_tags-live-filter-default.png) + +As soon as I type "os", all other tags are filtered out + +![Tags view filtered for +"os"]({static}/images/elegant-theme_tags-live-filter-filtered.png) + +With live filter, your reader will have no difficulty in picking up his desired +tag from the list, even if your site has hundreds of tags. diff --git a/documentation/content/Taxonomy/zero-clutter-category.md b/documentation/content/Taxonomy/zero-clutter-category.md new file mode 100644 index 00000000..8e752e66 --- /dev/null +++ b/documentation/content/Taxonomy/zero-clutter-category.md @@ -0,0 +1,31 @@ +--- +Title: Zero Clutter Categories +Tags: nuances, clean +layout: post +Date: 2013-08-27 23:20 +comments: false +Slug: zero-clutter-categories +Category: Taxonomy +authors: Talha Mansoor +--- + +Pelican by default creates a separate page for each category. Themes list all +the articles filed in that category at its page. Elegant takes a different +approach which is, "all Categories but with zero clutter". + +It lists all the categories and their articles on the same page. To reduce +clutter and utilize space efficiently, each category and its list of articles +is enclosed in [collapsible accordions](http://getbootstrap.com/2.3.2/javascript.html#collapse). + +Here is how categories appear collapsed + +![Categories accordions +collapsed]({static}/images/elegant-theme_category-accordions-collapsed.png) + +And this is how they appear uncollapsed + +![Categories accordions +uncollapsed]({static}/images/elegant-theme_category-accordions-uncollapsed.png) + +Did you notice that categories are listed in ascending alphabetical order and +articles are sorted by their date in descending order? diff --git a/documentation/content/images/elegant-theme_license.png b/documentation/content/images/elegant-theme_license.png index 289d6e07..f7127be4 100644 Binary files a/documentation/content/images/elegant-theme_license.png and b/documentation/content/images/elegant-theme_license.png differ diff --git a/documentation/content/images/hosted-on.png b/documentation/content/images/hosted-on.png new file mode 100644 index 00000000..74d2096f Binary files /dev/null and b/documentation/content/images/hosted-on.png differ diff --git a/documentation/content/pages/contribute.md b/documentation/content/pages/contribute.md deleted file mode 100644 index eb5fab72..00000000 --- a/documentation/content/pages/contribute.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -author: Pablo Iranzo Gómez (pablo.iranzo@gmail.com) -title: Contribute -tags: elegant, contribute -layout: page -date: 2019-01-14 7:30:47 +0100 -comments: true -category: Development -description: ---- - -[Elegant](https://github.com/Pelican-Elegant/elegant) is a feature rich-theme, driven by it's users. - -Contributing to the theme comes in different and all equally valuable ways - -- [Feedback (Bug reports, enhancement requests, etc)](https://github.com/pelican-elegant/elegant/issues/) -- [Documentation feedback/improvements/examples](https://github.com/pelican-elegant/documentation/issues/) -- Feature creation via Pull Requests on open issues -- Pull Request reviews, to comment on approach, code cleanup, etc - -Even a little feature that you might be missing, could be a big impact to other users that might not even have considered it before, so... - -Speak your mind or put your hands to make Elegant even better! - -Check <https://github.com/Pelican-Elegant/elegant/blob/master/CONTRIBUTING.md> for more details on how to help us improve! diff --git a/documentation/content/pages/landing-page-about-me.md b/documentation/content/pages/landing-page-about-me.md new file mode 100644 index 00000000..a5293375 --- /dev/null +++ b/documentation/content/pages/landing-page-about-me.md @@ -0,0 +1,27 @@ +--- +author: Talha Mansoor +title: What Is Elegant +layout: page +date: 2019-01-14 7:30:47 +0100 +status: hidden +slug: landing-page-about-hidden +--- + +Elegant is a stylish, responsive, and minimal Pelican +theme that looks amazing across all screen resolutions and devices. + +Elegant gives meaning to the expression **"sand the under side of the drawer"**. +Every feature and style of Elegant is the result of a long thought process. + +## What Makes Elegant So Special? + +Elegant is the only Pelican theme that search, live filter tags, zero clutter categories, lazy load comments, Mailchimp, FreeLists support and a customizable landing page. +That's not all. Go through our documentation, you will find several unique features and nuances that you will not find in any other theme. + +To top it of, it is the only theme with comprehensive documentation and an automated build, deploy and release process. + +## Try It Out + +This site is a demonstration and documentation of Elegant theme. + +To try out Elegant, you don't need to install anything. Just visit different pages of this site. Try the search function. Check out our categories. What you see here is what you get. diff --git a/documentation/pelicanconf.py b/documentation/pelicanconf.py index 7dfedc6a..87a63e29 100644 --- a/documentation/pelicanconf.py +++ b/documentation/pelicanconf.py @@ -69,8 +69,7 @@ ("RSS", SITEURL + "/feeds/all.atom.xml"), ) -CLAIM_GOOGLE = "Bk4Z5ucHLyPXqlZlj5LzANpYBBSvxqBW4E8i-Kwf-bQ" -CLAIM_BING = "8FF1B025212A47B5B27CC47163A042F0" +CLAIM_BING = "BC16AEBED17872F083B3E1E7A67454BD" # Elegant theme STATIC_PATHS = ["theme/images", "images", "extra/_redirects"] @@ -124,11 +123,25 @@ "url": "https://github.com/Pelican-Elegant/elegant", "description": "Source code of Elegant theme", }, + { + "name": "Issue Tracker", + "url": "https://github.com/Pelican-Elegant/elegant/issues", + "description": "Give your feedback, ask questions or report issues", + }, + { + "name": "Roadmap", + "url": "https://github.com/Pelican-Elegant/elegant/milestones", + "description": "See planned features and estimated release dates", + }, + { + "name": "onCrashReboot", + "url": "https://www.oncrashreboot.com/", + "description": "Home page of Elegant creator and lead developer", + }, { "name": "Pelican", "url": "https://github.com/getpelican/pelican/", - "description": "Static site generator that supports Markdown and" - " reST syntax", + "description": "Static site generator that powers Elegant", }, { "name": "Pelican Plugins", @@ -137,9 +150,15 @@ }, ] -LANDING_PAGE_ABOUT = { - "title": "Elegant – Why it is the Best Pelican Theme", - "details": """<p>This page serves both as documentation site and demonstration of Pelican-Elegant theme - capabilities and look&feel.</p><p>Please do check our Project pages and browse this site for more information. - </p>""", +LANDING_PAGE_TITLE = "Elegant – Why it is the Best Pelican Theme" + +AUTHORS = { + "Talha Mansoor": { + "url": "https://www.oncrashreboot.com/", + "blurb": "is the creator and lead developer of Elegant theme.", + }, + "Pablo Iranzo Gómez": { + "url": "http://iranzo.github.io", + "blurb": "has been involved with open source projects for more than a decade.", + }, } diff --git a/documentation/publishconf.py b/documentation/publishconf.py index f141ccdd..baa32e51 100644 --- a/documentation/publishconf.py +++ b/documentation/publishconf.py @@ -16,25 +16,19 @@ SITEURL = "https://elegant.oncrashreboot.com" FEED_ALL_ATOM = "feeds/all.atom.xml" CATEGORY_FEED_ATOM = "feeds/{slug}.atom.xml" - - if os.environ.get("STAT_COUNTER_PROJECT_PROD") and os.environ.get( - "STAT_COUNTER_SECURITY_PROD" - ): - STAT_COUNTER_PROJECT = os.environ.get("STAT_COUNTER_PROJECT_PROD") - STAT_COUNTER_SECURITY = os.environ.get("STAT_COUNTER_SECURITY_PROD") - GOOGLE_ANALYTICS = os.environ.get("GOOGLE_ANALYTICS_PROD") + CLAIM_BING = os.environ.get("CLAIM_BING_PROD") + STAT_COUNTER_PROJECT = os.environ.get("STAT_COUNTER_PROJECT_PROD") + STAT_COUNTER_SECURITY = os.environ.get("STAT_COUNTER_SECURITY_PROD") + GOOGLE_ANALYTICS = os.environ.get("GOOGLE_ANALYTICS_PROD") elif os.environ.get("CONTEXT") == "branch-deploy" and os.environ.get("HEAD") == "next": SITENAME = "Elegant (Next)" SITESUBTITLE = "Pre Release Documentation of The Best Pelican Theme" SITEURL = "https://next.elegant.oncrashreboot.com" - LANDING_PAGE_ABOUT["title"] = "Elegant (Next) – Why it is the Best Pelican Theme" - if os.environ.get("STAT_COUNTER_PROJECT_NEXT") and os.environ.get( - "STAT_COUNTER_SECURITY_NEXT" - ): - STAT_COUNTER_PROJECT = os.environ.get("STAT_COUNTER_PROJECT_NEXT") - STAT_COUNTER_SECURITY = os.environ.get("STAT_COUNTER_SECURITY_NEXT") - GOOGLE_ANALYTICS = os.environ.get("GOOGLE_ANALYTICS_NEXT") + LANDING_PAGE_TITLE = "Elegant (Next) – Why it is the Best Pelican Theme" + STAT_COUNTER_PROJECT = os.environ.get("STAT_COUNTER_PROJECT_NEXT") + STAT_COUNTER_SECURITY = os.environ.get("STAT_COUNTER_SECURITY_NEXT") + GOOGLE_ANALYTICS = os.environ.get("GOOGLE_ANALYTICS_NEXT") else: SITEURL = "" diff --git a/static/css/admonition.css b/static/css/admonition.css index 5455fdc2..9edddef6 100644 --- a/static/css/admonition.css +++ b/static/css/admonition.css @@ -16,6 +16,10 @@ div.admonition p { padding: 0; } +div.admonition p a { + color: inherit !important; +} + div.admonition pre { margin: 0.4em 1em 0.4em 1em; } diff --git a/templates/_includes/_defaults.html b/templates/_includes/_defaults.html index 4518932a..740a1ef5 100644 --- a/templates/_includes/_defaults.html +++ b/templates/_includes/_defaults.html @@ -119,17 +119,12 @@ {% set USE_SHORTCUT_ICONS = USE_SHORTCUT_ICONS %} {% endif %} -{# It is a dictionary with two keys: title, details. Value of each key is a -string. It is used to display About me section on the home page. -LANDING_PAGE_ABOUT = {'title': 'Talha Mansoor', - 'details': '<p>I am a software developer. This blog is' - 'my personal space in the cyber world!</p>' - } +{# It is a string #} -{% if not LANDING_PAGE_ABOUT %} -{% set LANDING_PAGE_ABOUT = '' %} +{% if not LANDING_PAGE_TITLE %} +{% set LANDING_PAGE_TITLE = '' %} {% else %} -{% set LANDING_PAGE_ABOUT = LANDING_PAGE_ABOUT %} +{% set LANDING_PAGE_TITLE = LANDING_PAGE_TITLE %} {% endif %} {# It is an array of dictionaries. Each dictionary has three keys: name, url, diff --git a/templates/_includes/freelists.html b/templates/_includes/freelists.html index 7604acaa..3bd3802b 100644 --- a/templates/_includes/freelists.html +++ b/templates/_includes/freelists.html @@ -19,7 +19,7 @@ <h4>{{ EMAIL_SUBSCRIPTION_LABEL }}</h4> <option value="unset vacation">Turn Vacation mode off</option> <option value="help">Get Help</option> </select> -<input type=submit value="Go!" class="button"> +<input type=submit value={{SUBSCRIBE_BUTTON_TITLE}} class="button"> </form> <!-- END FreeLists WEB FORM --> </div> diff --git a/templates/base.html b/templates/base.html index 96d2be86..a60363b2 100644 --- a/templates/base.html +++ b/templates/base.html @@ -64,7 +64,15 @@ <a class="brand" href="{{ SITEURL }}/"><span class=site-name>{{ SITENAME }}</span></a> <div class="nav-collapse collapse"> <ul class="nav pull-right top-menu"> - <li {% if page_name == 'index' %} class="active"{% endif %}><a href="{{ SITEURL }}">Home</a></li> + <li {% if page_name == 'index' %} class="active"{% endif %}> + <a href= + {% if SITEURL %} + {{ SITEURL }} + {% else %} + "/" + {% endif %} + >Home</a> + </li> {% if DISPLAY_PAGES_ON_MENU %} {% for p in pages %} <li {% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li> diff --git a/templates/index.html b/templates/index.html index e423cf56..09d64edc 100644 --- a/templates/index.html +++ b/templates/index.html @@ -6,10 +6,10 @@ {% block meta_tags_in_head %} {{ super() }} -{% from '_includes/_defaults.html' import LANDING_PAGE_ABOUT with context %} -{% if LANDING_PAGE_ABOUT and LANDING_PAGE_ABOUT.title %} -<meta property="og:title" content="{{ LANDING_PAGE_ABOUT.title|e }}"/> -<meta name="twitter:title" content="{{ LANDING_PAGE_ABOUT.title|e }}"> +{% from '_includes/_defaults.html' import LANDING_PAGE_TITLE with context %} +{% if LANDING_PAGE_TITLE %} +<meta property="og:title" content="{{ LANDING_PAGE_TITLE|e }}"/> +<meta name="twitter:title" content="{{ LANDING_PAGE_TITLE|e }}"> {% else %} <meta property="og:title" content="{{ SITENAME|striptags|e }}"/> <meta name="twitter:title" content="{{ SITENAME|striptags|e }}"> @@ -30,39 +30,45 @@ {% endblock meta_tags_in_head %} {% block content %} -{% from '_includes/_defaults.html' import LANDING_PAGE_ABOUT with context %} +{% from '_includes/_defaults.html' import LANDING_PAGE_TITLE with context %} {% from '_includes/_defaults.html' import PROJECTS with context %} {% from '_includes/_defaults.html' import PROJECTS_TITLE with context %} + +{% set landing_page = namespace(page=false) %} +{% for p in hidden_pages if p.slug == "landing-page-about-hidden" %} +{% set landing_page.page = p %} +{% endfor %} + <div class="row-fluid"> - {% if LANDING_PAGE_ABOUT and LANDING_PAGE_ABOUT.title %} + {% if LANDING_PAGE_TITLE %} {% set css_class = 'span10 offset2' %} - {% if PROJECTS and LANDING_PAGE_ABOUT %} + {% if PROJECTS and LANDING_PAGE_TITLE %} {% set css_class = 'span12' %} {% endif %} <header class="page-header {{css_class}}"> - <h1><a href="{{ SITEURL }}">{{ LANDING_PAGE_ABOUT.title }}</a></h1> + <h1><a href="{{ SITEURL }}">{{ LANDING_PAGE_TITLE }}</a></h1> </header> {% endif %} <div class="row-fluid"> - {% if LANDING_PAGE_ABOUT and LANDING_PAGE_ABOUT.details %} + {% if LANDING_PAGE_TITLE and landing_page.page %} {% set css_class = 'span8 offset2' %} - {% if PROJECTS and LANDING_PAGE_ABOUT %} + {% if PROJECTS and LANDING_PAGE_TITLE %} {% set css_class = 'span8' %} {% endif %} <div class="{{css_class}}"> <header> - <h1 id="about-me">About me</h1> + <h1 id="about-me">{{landing_page.page.title}}</h1> </header> <div class="article-content"> - {{ LANDING_PAGE_ABOUT.details }} + {{ landing_page.page.content }} </div> </div> {% endif %} {% if PROJECTS %} {% set css_class = 'span8 offset2' %} - {% if PROJECTS and LANDING_PAGE_ABOUT %} + {% if PROJECTS and LANDING_PAGE_TITLE %} {% set css_class = 'span4' %} {% endif %} <div class="{{css_class}}"> @@ -82,7 +88,7 @@ <h1 id="my-projects">{{ PROJECTS_TITLE }}</h1> {% if articles %} {% set css_class = 'span8 offset2' %} - {% if articles and PROJECTS and LANDING_PAGE_ABOUT %} + {% if articles and PROJECTS and LANDING_PAGE_TITLE %} {% set css_class = 'span12' %} {% endif %} <div class="row-fluid">