mirror of
https://github.com/olivierlacan/keep-a-changelog.git
synced 2025-07-27 15:54:06 +02:00
Add standard and run it on config
Baby steps.
This commit is contained in:
parent
51475fa00b
commit
84d7c7834a
1
Gemfile
1
Gemfile
@ -9,3 +9,4 @@ gem "middleman-minify-html"
|
|||||||
gem "middleman-syntax"
|
gem "middleman-syntax"
|
||||||
gem "middleman-gh-pages"
|
gem "middleman-gh-pages"
|
||||||
gem "redcarpet"
|
gem "redcarpet"
|
||||||
|
gem "standard", "~> 1.33"
|
||||||
|
63
Gemfile.lock
63
Gemfile.lock
@ -1,13 +1,14 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
activesupport (7.0.5)
|
activesupport (7.0.8)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
tzinfo (~> 2.0)
|
tzinfo (~> 2.0)
|
||||||
addressable (2.8.4)
|
addressable (2.8.6)
|
||||||
public_suffix (>= 2.0.2, < 6.0)
|
public_suffix (>= 2.0.2, < 6.0)
|
||||||
|
ast (2.4.2)
|
||||||
autoprefixer-rails (10.4.7.0)
|
autoprefixer-rails (10.4.7.0)
|
||||||
execjs (~> 2)
|
execjs (~> 2)
|
||||||
backports (3.24.1)
|
backports (3.24.1)
|
||||||
@ -15,7 +16,7 @@ GEM
|
|||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.12.2)
|
coffee-script-source (1.12.2)
|
||||||
concurrent-ruby (1.2.2)
|
concurrent-ruby (1.2.3)
|
||||||
contracts (0.17)
|
contracts (0.17)
|
||||||
dotenv (2.8.1)
|
dotenv (2.8.1)
|
||||||
em-websocket (0.5.3)
|
em-websocket (0.5.3)
|
||||||
@ -23,10 +24,10 @@ GEM
|
|||||||
http_parser.rb (~> 0)
|
http_parser.rb (~> 0)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
eventmachine (1.2.7)
|
eventmachine (1.2.7)
|
||||||
execjs (2.8.1)
|
execjs (2.9.1)
|
||||||
fast_blank (1.0.1)
|
fast_blank (1.0.1)
|
||||||
fastimage (2.2.7)
|
fastimage (2.3.0)
|
||||||
ffi (1.15.5)
|
ffi (1.16.3)
|
||||||
haml (6.1.1)
|
haml (6.1.1)
|
||||||
temple (>= 0.8.2)
|
temple (>= 0.8.2)
|
||||||
thor
|
thor
|
||||||
@ -38,8 +39,11 @@ GEM
|
|||||||
http_parser.rb (0.8.0)
|
http_parser.rb (0.8.0)
|
||||||
i18n (1.6.0)
|
i18n (1.6.0)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
|
json (2.7.1)
|
||||||
kramdown (2.4.0)
|
kramdown (2.4.0)
|
||||||
rexml
|
rexml
|
||||||
|
language_server-protocol (3.17.0.3)
|
||||||
|
lint_roller (1.1.0)
|
||||||
listen (3.8.0)
|
listen (3.8.0)
|
||||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||||
rb-inotify (~> 0.9, >= 0.9.10)
|
rb-inotify (~> 0.9, >= 0.9.10)
|
||||||
@ -93,31 +97,66 @@ GEM
|
|||||||
middleman-minify-html (3.4.1)
|
middleman-minify-html (3.4.1)
|
||||||
htmlcompressor (~> 0.2.0)
|
htmlcompressor (~> 0.2.0)
|
||||||
middleman-core (>= 3.2)
|
middleman-core (>= 3.2)
|
||||||
middleman-syntax (3.3.0)
|
middleman-syntax (3.4.0)
|
||||||
middleman-core (>= 3.2)
|
middleman-core (>= 3.2)
|
||||||
rouge (~> 3.2)
|
rouge (~> 3.2)
|
||||||
minitest (5.18.0)
|
minitest (5.21.2)
|
||||||
padrino-helpers (0.15.3)
|
padrino-helpers (0.15.3)
|
||||||
i18n (>= 0.6.7, < 2)
|
i18n (>= 0.6.7, < 2)
|
||||||
padrino-support (= 0.15.3)
|
padrino-support (= 0.15.3)
|
||||||
tilt (>= 1.4.1, < 3)
|
tilt (>= 1.4.1, < 3)
|
||||||
padrino-support (0.15.3)
|
padrino-support (0.15.3)
|
||||||
parallel (1.23.0)
|
parallel (1.24.0)
|
||||||
|
parser (3.3.0.5)
|
||||||
|
ast (~> 2.4.1)
|
||||||
|
racc
|
||||||
parslet (2.0.0)
|
parslet (2.0.0)
|
||||||
public_suffix (5.0.1)
|
public_suffix (5.0.4)
|
||||||
rack (2.2.7)
|
racc (1.7.3)
|
||||||
|
rack (2.2.8)
|
||||||
rack-livereload (0.3.17)
|
rack-livereload (0.3.17)
|
||||||
rack
|
rack
|
||||||
|
rainbow (3.1.1)
|
||||||
rake (13.0.6)
|
rake (13.0.6)
|
||||||
rb-fsevent (0.11.2)
|
rb-fsevent (0.11.2)
|
||||||
rb-inotify (0.10.1)
|
rb-inotify (0.10.1)
|
||||||
ffi (~> 1.0)
|
ffi (~> 1.0)
|
||||||
redcarpet (3.6.0)
|
redcarpet (3.6.0)
|
||||||
|
regexp_parser (2.9.0)
|
||||||
rexml (3.2.5)
|
rexml (3.2.5)
|
||||||
rouge (3.30.0)
|
rouge (3.30.0)
|
||||||
|
rubocop (1.59.0)
|
||||||
|
json (~> 2.3)
|
||||||
|
language_server-protocol (>= 3.17.0)
|
||||||
|
parallel (~> 1.10)
|
||||||
|
parser (>= 3.2.2.4)
|
||||||
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
|
regexp_parser (>= 1.8, < 3.0)
|
||||||
|
rexml (>= 3.2.5, < 4.0)
|
||||||
|
rubocop-ast (>= 1.30.0, < 2.0)
|
||||||
|
ruby-progressbar (~> 1.7)
|
||||||
|
unicode-display_width (>= 2.4.0, < 3.0)
|
||||||
|
rubocop-ast (1.30.0)
|
||||||
|
parser (>= 3.2.1.0)
|
||||||
|
rubocop-performance (1.20.2)
|
||||||
|
rubocop (>= 1.48.1, < 2.0)
|
||||||
|
rubocop-ast (>= 1.30.0, < 2.0)
|
||||||
|
ruby-progressbar (1.13.0)
|
||||||
sassc (2.4.0)
|
sassc (2.4.0)
|
||||||
ffi (~> 1.9)
|
ffi (~> 1.9)
|
||||||
servolux (0.13.0)
|
servolux (0.13.0)
|
||||||
|
standard (1.33.0)
|
||||||
|
language_server-protocol (~> 3.17.0.2)
|
||||||
|
lint_roller (~> 1.0)
|
||||||
|
rubocop (~> 1.59.0)
|
||||||
|
standard-custom (~> 1.0.0)
|
||||||
|
standard-performance (~> 1.3)
|
||||||
|
standard-custom (1.0.2)
|
||||||
|
lint_roller (~> 1.0)
|
||||||
|
rubocop (~> 1.50)
|
||||||
|
standard-performance (1.3.1)
|
||||||
|
lint_roller (~> 1.1)
|
||||||
|
rubocop-performance (~> 1.20.2)
|
||||||
temple (0.10.2)
|
temple (0.10.2)
|
||||||
thor (1.2.2)
|
thor (1.2.2)
|
||||||
tilt (2.0.11)
|
tilt (2.0.11)
|
||||||
@ -127,6 +166,7 @@ GEM
|
|||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
uglifier (3.2.0)
|
uglifier (3.2.0)
|
||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
|
unicode-display_width (2.5.0)
|
||||||
webrick (1.8.1)
|
webrick (1.8.1)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
@ -142,6 +182,7 @@ DEPENDENCIES
|
|||||||
middleman-minify-html
|
middleman-minify-html
|
||||||
middleman-syntax
|
middleman-syntax
|
||||||
redcarpet
|
redcarpet
|
||||||
|
standard (~> 1.33)
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.1.4
|
2.1.4
|
||||||
|
50
config.rb
50
config.rb
@ -5,7 +5,7 @@
|
|||||||
# ----- Site ----- #
|
# ----- Site ----- #
|
||||||
# Last version should be the latest English version since the manifesto is first
|
# Last version should be the latest English version since the manifesto is first
|
||||||
# written in English, then translated into other languages later.
|
# written in English, then translated into other languages later.
|
||||||
$versions = Dir.glob("source/en/*").map{ |e| e.sub("source/en/","") }.sort
|
$versions = Dir.glob("source/en/*").map { |e| e.sub("source/en/", "") }.sort
|
||||||
# NOTE: for now, while 1.1.0 is in development let's pin the latest
|
# NOTE: for now, while 1.1.0 is in development let's pin the latest
|
||||||
# version to 1.0.0 manually.
|
# version to 1.0.0 manually.
|
||||||
# $last_version = $versions.last
|
# $last_version = $versions.last
|
||||||
@ -13,7 +13,7 @@ $last_version = "1.1.0"
|
|||||||
$previous_version = $versions[$versions.index($last_version) - 1]
|
$previous_version = $versions[$versions.index($last_version) - 1]
|
||||||
|
|
||||||
# This list of languages populates the language navigation.
|
# This list of languages populates the language navigation.
|
||||||
issues_url = 'https://github.com/olivierlacan/keep-a-changelog/issues'
|
issues_url = "https://github.com/olivierlacan/keep-a-changelog/issues"
|
||||||
$languages = {
|
$languages = {
|
||||||
"ar" => {
|
"ar" => {
|
||||||
name: "العربية"
|
name: "العربية"
|
||||||
@ -85,7 +85,7 @@ $languages = {
|
|||||||
<a href='#{issues_url}'>ajudar em sua tradução</a>."
|
<a href='#{issues_url}'>ajudar em sua tradução</a>."
|
||||||
},
|
},
|
||||||
"ro" => {
|
"ro" => {
|
||||||
name: 'română',
|
name: "română",
|
||||||
new: "O nouă versiune este disponibilă"
|
new: "O nouă versiune este disponibilă"
|
||||||
},
|
},
|
||||||
"ru" => {
|
"ru" => {
|
||||||
@ -139,9 +139,9 @@ activate :i18n,
|
|||||||
lang_map: $languages,
|
lang_map: $languages,
|
||||||
mount_at_root: :en
|
mount_at_root: :en
|
||||||
|
|
||||||
set :gauges_id, ''
|
set :gauges_id, ""
|
||||||
set :publisher_url, 'https://www.facebook.com/olivier.lacan.5'
|
set :publisher_url, "https://www.facebook.com/olivier.lacan.5"
|
||||||
set :site_url, 'https://keepachangelog.com'
|
set :site_url, "https://keepachangelog.com"
|
||||||
|
|
||||||
redirect "index.html", to: "en/#{$last_version}/index.html"
|
redirect "index.html", to: "en/#{$last_version}/index.html"
|
||||||
|
|
||||||
@ -153,10 +153,10 @@ end
|
|||||||
|
|
||||||
# ----- Assets ----- #
|
# ----- Assets ----- #
|
||||||
|
|
||||||
set :css_dir, 'assets/stylesheets'
|
set :css_dir, "assets/stylesheets"
|
||||||
set :js_dir, 'assets/javascripts'
|
set :js_dir, "assets/javascripts"
|
||||||
set :images_dir, 'assets/images'
|
set :images_dir, "assets/images"
|
||||||
set :fonts_dir, 'assets/fonts'
|
set :fonts_dir, "assets/fonts"
|
||||||
|
|
||||||
# ----- Images ----- #
|
# ----- Images ----- #
|
||||||
|
|
||||||
@ -170,7 +170,7 @@ set :markdown_engine, :redcarpet
|
|||||||
## Override default Redcarpet renderer in order to define a class
|
## Override default Redcarpet renderer in order to define a class
|
||||||
class CustomMarkdownRenderer < Redcarpet::Render::HTML
|
class CustomMarkdownRenderer < Redcarpet::Render::HTML
|
||||||
def doc_header
|
def doc_header
|
||||||
%Q[<nav class="toc">#{@header}</nav>]
|
%(<nav class="toc">#{@header}</nav>)
|
||||||
end
|
end
|
||||||
|
|
||||||
def header(text, header_level)
|
def header(text, header_level)
|
||||||
@ -216,8 +216,6 @@ helpers do
|
|||||||
"#{$last_version} #{language_name}"
|
"#{$last_version} #{language_name}"
|
||||||
elsif File.exist?("#{language_path}/#{$previous_version}")
|
elsif File.exist?("#{language_path}/#{$previous_version}")
|
||||||
"#{$previous_version} #{language_name}"
|
"#{$previous_version} #{language_name}"
|
||||||
else
|
|
||||||
nil
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -263,7 +261,7 @@ end
|
|||||||
# ----- Prefixing ----- #
|
# ----- Prefixing ----- #
|
||||||
|
|
||||||
activate :autoprefixer do |config|
|
activate :autoprefixer do |config|
|
||||||
config.browsers = ['last 2 versions', 'Explorer >= 10']
|
config.browsers = ["last 2 versions", "Explorer >= 10"]
|
||||||
config.cascade = false
|
config.cascade = false
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -271,18 +269,18 @@ end
|
|||||||
# default Markdown Haml filter and reconfigure one that follows our
|
# default Markdown Haml filter and reconfigure one that follows our
|
||||||
# global configuration.
|
# global configuration.
|
||||||
|
|
||||||
module Haml::Filters
|
# module Haml::Filters
|
||||||
remove_filter("Markdown") #remove the existing Markdown filter
|
# remove_filter("Markdown") #remove the existing Markdown filter
|
||||||
|
|
||||||
module Markdown
|
# module Markdown
|
||||||
include Haml::Filters::Base
|
# include Haml::Filters::Base
|
||||||
|
|
||||||
def renderer
|
# def renderer
|
||||||
$markdown_config[:renderer]
|
# $markdown_config[:renderer]
|
||||||
end
|
# end
|
||||||
|
|
||||||
def render(text)
|
# def render(text)
|
||||||
Redcarpet::Markdown.new(renderer.new($markdown_config)).render(text)
|
# Redcarpet::Markdown.new(renderer.new($markdown_config)).render(text)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user