station 0.0.93 → 0.0.101

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +6 -5
  3. data/Gemfile +1 -1
  4. data/Gemfile.lock +1 -1
  5. data/bin/nexmo-developer +11 -3
  6. data/lib/nexmo_developer/.rubocop.yml +3 -0
  7. data/lib/nexmo_developer/.ruby-version +1 -1
  8. data/lib/nexmo_developer/Dockerfile +1 -1
  9. data/lib/nexmo_developer/Gemfile +5 -5
  10. data/lib/nexmo_developer/Gemfile.lock +16 -16
  11. data/lib/nexmo_developer/Guardfile +2 -2
  12. data/lib/nexmo_developer/app/controllers/dashboard_controller.rb +1 -1
  13. data/lib/nexmo_developer/app/presenters/tutorial_list_item.rb +3 -3
  14. data/lib/nexmo_developer/app/views/contribute/guides/markdown-guide.md +70 -48
  15. data/lib/nexmo_developer/app/webpacker/javascript/components/feedback/Feedback.vue +1 -0
  16. data/lib/nexmo_developer/app/webpacker/stylesheets/layout/_api.scss +1 -0
  17. data/lib/nexmo_developer/config/webpack/custom.js +7 -0
  18. data/lib/nexmo_developer/config/webpack/environment.js +4 -0
  19. data/lib/nexmo_developer/version.rb +1 -1
  20. data/package.json +13 -13
  21. data/station.gemspec +14 -7
  22. data/yarn.lock +316 -242
  23. metadata +34 -149
  24. data/lib/nexmo_developer/public/packs-test/css/application-5047da33.chunk.css +0 -14950
  25. data/lib/nexmo_developer/public/packs-test/css/application-5047da33.chunk.css.map +0 -1
  26. data/lib/nexmo_developer/public/packs-test/css/application-a5fa0fdb.chunk.css +0 -15085
  27. data/lib/nexmo_developer/public/packs-test/css/application-a5fa0fdb.chunk.css.map +0 -1
  28. data/lib/nexmo_developer/public/packs-test/css/application-f92656e6.chunk.css +0 -13
  29. data/lib/nexmo_developer/public/packs-test/css/application-f92656e6.chunk.css.map +0 -1
  30. data/lib/nexmo_developer/public/packs-test/css/application-f9d1bdbc.chunk.css +0 -13
  31. data/lib/nexmo_developer/public/packs-test/css/application-f9d1bdbc.chunk.css.map +0 -1
  32. data/lib/nexmo_developer/public/packs-test/js/0-e58f598fb97314a89835.chunk.js +0 -59763
  33. data/lib/nexmo_developer/public/packs-test/js/0-e58f598fb97314a89835.chunk.js.map +0 -1
  34. data/lib/nexmo_developer/public/packs-test/js/application-21483bf220c794127fa9.chunk.js +0 -6405
  35. data/lib/nexmo_developer/public/packs-test/js/application-21483bf220c794127fa9.chunk.js.map +0 -1
  36. data/lib/nexmo_developer/public/packs-test/js/application-6e53f67bc3230c42f9dd.chunk.js +0 -7839
  37. data/lib/nexmo_developer/public/packs-test/js/application-6e53f67bc3230c42f9dd.chunk.js.map +0 -1
  38. data/lib/nexmo_developer/public/packs-test/js/application-76d5a80c3775a7e2327a.chunk.js +0 -6405
  39. data/lib/nexmo_developer/public/packs-test/js/application-76d5a80c3775a7e2327a.chunk.js.map +0 -1
  40. data/lib/nexmo_developer/public/packs-test/js/application-c6f3e7a9d98562f76890.chunk.js +0 -6619
  41. data/lib/nexmo_developer/public/packs-test/js/application-c6f3e7a9d98562f76890.chunk.js.map +0 -1
  42. data/lib/nexmo_developer/public/packs-test/js/application-d280e78dd4f9d3d9b466.chunk.js +0 -6405
  43. data/lib/nexmo_developer/public/packs-test/js/application-d280e78dd4f9d3d9b466.chunk.js.map +0 -1
  44. data/lib/nexmo_developer/public/packs-test/js/runtime~application-1c11a8c601900ade80b6.js +0 -155
  45. data/lib/nexmo_developer/public/packs-test/js/runtime~application-1c11a8c601900ade80b6.js.map +0 -1
  46. data/lib/nexmo_developer/public/packs-test/js/vendors~application-6518249ed8d7aa985a8b.chunk.js +0 -61849
  47. data/lib/nexmo_developer/public/packs-test/js/vendors~application-6518249ed8d7aa985a8b.chunk.js.map +0 -1
  48. data/lib/nexmo_developer/public/packs-test/js/vendors~application-bc967911d70f3f4a5151.chunk.js +0 -59077
  49. data/lib/nexmo_developer/public/packs-test/js/vendors~application-bc967911d70f3f4a5151.chunk.js.map +0 -1
  50. data/lib/nexmo_developer/public/packs-test/js/vendors~application-d2bde7a8e622fafdeb1d.chunk.js +0 -61843
  51. data/lib/nexmo_developer/public/packs-test/js/vendors~application-d2bde7a8e622fafdeb1d.chunk.js.map +0 -1
  52. data/lib/nexmo_developer/public/packs-test/js/vendors~application-eb13e7814c54bf76b364.chunk.js +0 -62431
  53. data/lib/nexmo_developer/public/packs-test/js/vendors~application-eb13e7814c54bf76b364.chunk.js.map +0 -1
  54. data/lib/nexmo_developer/public/packs-test/manifest.json +0 -85
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6afd924d4cffe55394126dd3860edc66bd5ea1c3cb8f11391db094c3d5f88218
4
- data.tar.gz: 455ed9a2fea84dafc95fcf8f4fba3db64bb0b554326608b9c8b5506cdccaf5aa
3
+ metadata.gz: 64bf1507199f0467d7ac42ef46aa922b15d53e141fd745fdbc3c0a69fd4efda6
4
+ data.tar.gz: 97c0cdb2f92ee2d32c69486efba81d50cf9cbdfedbb642547a0281d6ac38efc1
5
5
  SHA512:
6
- metadata.gz: 00c95fa2ee3520828c74b81d39729d94074a4f80c54a1aa54992a6f8d7332c2fc776c311d8eced8e08b9090106bec63195c6b53a11474799bc9f8d0a1f3bf56a
7
- data.tar.gz: 488cfab84f13a23c7bfb394746da85e5929530870dbf0538b928107ba96076a74337a339179af8152ab52c860eea7cf60df2f0353dc226da2cd1eda5305334fa
6
+ metadata.gz: a9edf65ea65cd4cad757672e746b2b0d3bec273190f152af2789ef34fd4f13f49604ed4d63dde4c45b83905ece33f56dd059ed2a061a10d0e8c4d38c1b07c06a
7
+ data.tar.gz: 884ed537ecaf8e7715a2569bf7188df61d5fc6e0bb4a01fb7c3a6247386d99b9aa918ef5debfadacfd453b33835f1adef8c8b27e21827e377826f50d43bccae3
data/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM ruby:2.5.8-alpine AS build-env
1
+ FROM ruby:2.7.2-alpine AS build-env
2
2
  ARG RAILS_ROOT=/station
3
3
  ARG BUILD_PACKAGES="build-base curl-dev git"
4
4
  ARG DEV_PACKAGES="postgresql-dev yaml-dev zlib-dev nodejs yarn"
@@ -19,11 +19,12 @@ COPY lib/nexmo_developer/Gemfile* package.json yarn.lock $RAILS_ROOT/
19
19
  RUN bundle config --global frozen 1 \
20
20
  && gem update --system \
21
21
  && gem install bundler
22
+
22
23
  RUN bundle install --without development:test:assets -j4 --retry 3 --path=vendor/bundle \
23
24
  # Remove unneeded files (cached *.gem, *.o, *.c)
24
- && rm -rf vendor/bundle/ruby/2.5.0/cache/*.gem \
25
- && find vendor/bundle/ruby/2.5.0/gems/ -name "*.c" -delete \
26
- && find vendor/bundle/ruby/2.5.0/gems/ -name "*.o" -delete
25
+ && rm -rf vendor/bundle/ruby/2.7.0/cache/*.gem \
26
+ && find vendor/bundle/ruby/2.7.0/gems/ -name "*.c" -delete \
27
+ && find vendor/bundle/ruby/2.7.0/gems/ -name "*.o" -delete
27
28
 
28
29
  # Install node dependencies
29
30
  RUN yarn install --frozen-lockfile
@@ -36,7 +37,7 @@ RUN bundle exec rake assets:precompile
36
37
  RUN rm -rf node_modules tmp/cache vendor/assets spec
37
38
 
38
39
  ################ Build step done ###############
39
- FROM ruby:2.5.8-alpine
40
+ FROM ruby:2.7.2-alpine
40
41
  ARG RAILS_ROOT=/station
41
42
 
42
43
  ENV RACK_ENV production
data/Gemfile CHANGED
@@ -1,2 +1,2 @@
1
1
  source 'https://rubygems.org'
2
- ruby '2.5.8'
2
+ ruby '2.7.2'
@@ -8,7 +8,7 @@ PLATFORMS
8
8
  DEPENDENCIES
9
9
 
10
10
  RUBY VERSION
11
- ruby 2.5.8p224
11
+ ruby 2.7.2p137
12
12
 
13
13
  BUNDLED WITH
14
14
  2.1.4
@@ -3,6 +3,7 @@ require 'optparse'
3
3
 
4
4
  clear_cache = false
5
5
  rake_ci = false
6
+ run_migrations = false
6
7
  rake_smartling_download = false
7
8
  rake_smartling_upload = false
8
9
 
@@ -26,6 +27,9 @@ docs_path = OptionParser.new do |opts|
26
27
  opts.on("--clear-cache", "Clear Rails cache") do
27
28
  clear_cache = true
28
29
  end
30
+ opts.on("--run-migrations", "Runs db migrations") do
31
+ run_migrations = true
32
+ end
29
33
  opts.on("--rake-ci", "Runs ci tasks") do
30
34
  rake_ci = true
31
35
  end
@@ -87,23 +91,27 @@ require 'rake'
87
91
  require 'config/application'
88
92
  require 'rails/command'
89
93
 
94
+ Rails.application.load_tasks
95
+
90
96
  if clear_cache
91
97
  puts "Clearing Rails cache..."
92
98
  Rails::Command.invoke 'runner', ['Rails.cache.clear']
93
99
  end
94
100
 
101
+ if run_migrations
102
+ puts "Running migrations..."
103
+ Rails::Command.invoke 'runner', ["Rake::Task['db:migrate'].invoke"]
104
+ end
105
+
95
106
  if rake_ci
96
107
  puts 'Running Rake tasks...'
97
- Rails.application.load_tasks
98
108
  Rails::Command.invoke 'runner', ["Rake::Task['db:setup'].invoke"]
99
109
  Rails::Command.invoke 'runner', ["Rake::Task['ci:all'].invoke"]
100
110
  elsif rake_smartling_download
101
111
  puts 'Running Smartling download check...'
102
- Rails.application.load_tasks
103
112
  Rails::Command.invoke 'runner', ["Rake::Task['smartling:download'].invoke"]
104
113
  elsif rake_smartling_upload
105
114
  puts 'Running Smartling upload process...'
106
- Rails.application.load_tasks
107
115
 
108
116
  frequency, *paths = ARGV
109
117
  Rails::Command.invoke 'runner', ["Rake::Task['smartling:upload'].invoke(#{paths}, #{frequency})"]
@@ -271,3 +271,6 @@ Rails/SquishedSQLHeredocs:
271
271
 
272
272
  Rails/WhereNot:
273
273
  Enabled: true
274
+
275
+ Lint/DuplicateBranch:
276
+ Enabled: false
@@ -1 +1 @@
1
- 2.5.8
1
+ 2.7.2
@@ -1,5 +1,5 @@
1
1
  # Base image:
2
- FROM ruby:2.5.8
2
+ FROM ruby:2.7.2
3
3
 
4
4
  # Install dependencies
5
5
  RUN apt-get update -qq && apt-get install -y build-essential libpq-dev lsof
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
- ruby '2.5.8'
2
+ ruby '2.7.2'
3
3
 
4
4
  git_source(:github) do |repo_name|
5
5
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?('/')
@@ -74,7 +74,7 @@ gem 'icalendar', require: false
74
74
  gem 'neatjson'
75
75
 
76
76
  # Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.
77
- gem 'faker', '2.14.0', require: false
77
+ gem 'faker', '2.15.1', require: false
78
78
 
79
79
  # factory_girl_rails provides integration between factory_girl and rails 3 or newer (currently just automatic factory definition loading)
80
80
  gem 'factory_bot_rails', '6.1.0', require: false
@@ -110,7 +110,7 @@ gem 'bootsnap', require: false
110
110
  gem 'diffy', require: false
111
111
 
112
112
  # Automatic Ruby code style checking tool. Aims to enforce the community-driven Ruby Style Guide.
113
- gem 'rubocop', '~> 1.2.0', require: false
113
+ gem 'rubocop', '~> 1.4.1', require: false
114
114
  gem 'rubocop-rails', '~> 2.8', require: false
115
115
 
116
116
  # Volta needs a CSS autoprefixer
@@ -129,9 +129,9 @@ gem 'lograge'
129
129
  gem 'countries'
130
130
  gem 'country_select', '~> 4.0'
131
131
 
132
- gem 'nexmo-oas-renderer', '~> 2.4.0', require: false
132
+ gem 'nexmo-oas-renderer', '~> 2.4.1', require: false
133
133
 
134
- gem 'nexmo_markdown_renderer', '~> 0.5'
134
+ gem 'nexmo_markdown_renderer', '~> 0.6'
135
135
 
136
136
  gem 'smartling'
137
137
 
@@ -163,7 +163,7 @@ GEM
163
163
  em-websocket (0.5.2)
164
164
  eventmachine (>= 0.12.9)
165
165
  http_parser.rb (~> 0.6.0)
166
- erubi (1.9.0)
166
+ erubi (1.10.0)
167
167
  eventmachine (1.2.7)
168
168
  execjs (2.7.0)
169
169
  factory_bot (6.1.0)
@@ -171,7 +171,7 @@ GEM
171
171
  factory_bot_rails (6.1.0)
172
172
  factory_bot (~> 6.1.0)
173
173
  railties (>= 5.0.0)
174
- faker (2.14.0)
174
+ faker (2.15.1)
175
175
  i18n (>= 1.6, < 2)
176
176
  faraday (1.1.0)
177
177
  multipart-post (>= 1.2, < 3)
@@ -258,7 +258,7 @@ GEM
258
258
  activerecord
259
259
  kaminari-core (= 1.2.1)
260
260
  kaminari-core (1.2.1)
261
- listen (3.3.0)
261
+ listen (3.3.1)
262
262
  rb-fsevent (~> 0.10, >= 0.10.3)
263
263
  rb-inotify (~> 0.9, >= 0.9.10)
264
264
  lograge (0.11.2)
@@ -294,8 +294,8 @@ GEM
294
294
  neatjson (0.9)
295
295
  nenv (0.3.0)
296
296
  netrc (0.11.0)
297
- newrelic_rpm (6.13.1)
298
- nexmo-oas-renderer (2.4.0)
297
+ newrelic_rpm (6.14.0)
298
+ nexmo-oas-renderer (2.4.1)
299
299
  activemodel (~> 6.0)
300
300
  activesupport (~> 6.0)
301
301
  banzai (~> 0.1.2)
@@ -308,7 +308,7 @@ GEM
308
308
  sass (~> 3.1)
309
309
  shotgun (~> 0.9)
310
310
  sinatra (~> 2.0)
311
- nexmo_markdown_renderer (0.5.0)
311
+ nexmo_markdown_renderer (0.6.0)
312
312
  activemodel (~> 6.0)
313
313
  banzai (~> 0.1.2)
314
314
  i18n (~> 1.7)
@@ -340,7 +340,7 @@ GEM
340
340
  sawyer (~> 0.8.0, >= 0.5.3)
341
341
  oj (3.10.15)
342
342
  orm_adapter (0.5.0)
343
- parallel (1.19.2)
343
+ parallel (1.20.1)
344
344
  parser (2.7.2.0)
345
345
  ast (~> 2.4.1)
346
346
  pg (1.2.3)
@@ -398,7 +398,7 @@ GEM
398
398
  recaptcha (5.6.0)
399
399
  json
400
400
  redcarpet (3.4.0)
401
- redis (4.2.2)
401
+ redis (4.2.5)
402
402
  regexp_parser (1.8.2)
403
403
  request_store (1.5.0)
404
404
  rack (>= 1.4)
@@ -437,13 +437,13 @@ GEM
437
437
  rspec-snapshot (0.1.2)
438
438
  rspec (> 3.0.0)
439
439
  rspec-support (3.10.0)
440
- rubocop (1.2.0)
440
+ rubocop (1.4.1)
441
441
  parallel (~> 1.10)
442
442
  parser (>= 2.7.1.5)
443
443
  rainbow (>= 2.2.2, < 4.0)
444
444
  regexp_parser (>= 1.8)
445
445
  rexml
446
- rubocop-ast (>= 1.0.1)
446
+ rubocop-ast (>= 1.1.1)
447
447
  ruby-progressbar (~> 1.7)
448
448
  unicode-display_width (>= 1.4.0, < 2.0)
449
449
  rubocop-ast (1.1.1)
@@ -529,7 +529,7 @@ GEM
529
529
  activemodel (>= 6.0.0)
530
530
  bindex (>= 0.4.0)
531
531
  railties (>= 6.0.0)
532
- webmock (3.9.5)
532
+ webmock (3.10.0)
533
533
  addressable (>= 2.3.6)
534
534
  crack (>= 0.3.2)
535
535
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -573,7 +573,7 @@ DEPENDENCIES
573
573
  diffy
574
574
  dotenv-rails
575
575
  factory_bot_rails (= 6.1.0)
576
- faker (= 2.14.0)
576
+ faker (= 2.15.1)
577
577
  ffi (>= 1.9.24)
578
578
  geocoder
579
579
  gmaps4rails
@@ -589,8 +589,8 @@ DEPENDENCIES
589
589
  lograge
590
590
  neatjson
591
591
  newrelic_rpm
592
- nexmo-oas-renderer (~> 2.4.0)
593
- nexmo_markdown_renderer (~> 0.5)
592
+ nexmo-oas-renderer (~> 2.4.1)
593
+ nexmo_markdown_renderer (~> 0.6)
594
594
  nokogiri (~> 1.10.9)
595
595
  octokit
596
596
  pg (~> 1.2)
@@ -605,7 +605,7 @@ DEPENDENCIES
605
605
  rspec-collection_matchers
606
606
  rspec-rails (~> 4.0)
607
607
  rspec-snapshot (~> 0.1.2)
608
- rubocop (~> 1.2.0)
608
+ rubocop (~> 1.4.1)
609
609
  rubocop-rails (~> 2.8)
610
610
  ruby-progressbar
611
611
  sassc-rails (~> 2.1)
@@ -624,7 +624,7 @@ DEPENDENCIES
624
624
  woothee
625
625
 
626
626
  RUBY VERSION
627
- ruby 2.5.8p224
627
+ ruby 2.7.2p137
628
628
 
629
629
  BUNDLED WITH
630
630
  2.1.4
@@ -5,7 +5,7 @@
5
5
  # directories %w(app lib config test spec features) \
6
6
  # .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
7
7
 
8
- ## Note: if you are using the `directories` clause above and you are not
8
+ ## NOTE: if you are using the `directories` clause above and you are not
9
9
  ## watching the project directory ('.'), then you will want to move
10
10
  ## the Guardfile to a watched dir and symlink it back, e.g.
11
11
  #
@@ -54,7 +54,7 @@ guard 'livereload' do
54
54
  watch(%r{config/locales/.+\.yml})
55
55
  end
56
56
 
57
- # Note: The cmd option is now required due to the increasing number of ways
57
+ # NOTE: The cmd option is now required due to the increasing number of ways
58
58
  # rspec may be run, below are examples of the most common uses.
59
59
  # * bundler: 'bundle exec rspec'
60
60
  # * bundler binstubs: 'bin/rspec'
@@ -197,7 +197,7 @@ class DashboardController < ApplicationController
197
197
 
198
198
  parts.insert(1, 'top-level') if parts.count < 3
199
199
 
200
- parts = [parts[0], parts[1], parts[2..-1].join('/')] if parts.count > 3
200
+ parts = [parts[0], parts[1], parts[2..].join('/')] if parts.count > 3
201
201
  next if parts[0] == 'migrate'
202
202
 
203
203
  x = @complete_coverage
@@ -62,11 +62,11 @@ class TutorialListItem
62
62
  end
63
63
 
64
64
  def product_url
65
- "/#{I18n.locale}/#{products.join('')}/tutorials"
65
+ "/#{I18n.locale}/#{products.join}/tutorials"
66
66
  end
67
67
 
68
68
  def url
69
- external_link || "/#{I18n.locale}/#{products.join('')}/tutorials/#{filename}/#{first_step}"
69
+ external_link || "/#{I18n.locale}/#{products.join}/tutorials/#{filename}/#{first_step}"
70
70
  end
71
71
 
72
72
  def available_languages
@@ -74,7 +74,7 @@ class TutorialListItem
74
74
  OpenStruct.new(
75
75
  language: language,
76
76
  label: Nexmo::Markdown::CodeLanguage.find(language).label,
77
- url: external_link || "/#{products.join('')}/tutorials/#{filename}/#{first_step}/#{language}"
77
+ url: external_link || "/#{products.join}/tutorials/#{filename}/#{first_step}/#{language}"
78
78
  )
79
79
  end
80
80
  end
@@ -28,19 +28,19 @@ navigation_weight: 3
28
28
 
29
29
  The purpose of the metadata is to provide useful information in the following areas:
30
30
 
31
- * Algolia search results (that is when you search in NDP)
32
- * Google (and other external search engine) search results
33
- * Information for the navbar (also sometimes called the table of contents or TOC)
31
+ - Algolia search results (that is when you search in NDP)
32
+ - Google (and other external search engine) search results
33
+ - Information for the navbar (also sometimes called the table of contents or TOC)
34
34
 
35
35
  The meta data items that can be used are described in the following table:
36
36
 
37
- Metadata | HTML generated | Description
38
- ----|----|----
39
- `title` | N/A | This is the title for the topic that will be displayed in the navbar. This main be different to that display at the top of the topic. It is displayed in the Algolia search results when you search NDP.
40
- `description` | N/A | This is the short description for the topic. It is displayed in the Algolia search results when you search NDP. It should indicate the nature of the content of the topic.
41
- `meta_title` | `<head><title>The title</title>...</head>` | Used for SEO in external search engine results. This should be more descriptive than the `title` to provide additional context in the absence of the navbar. [Further reading](https://moz.com/learn/seo/title-tag).
42
- `meta_description` | `<head><meta name="description" content="The description">...</head>` | Used in external search engine results. Provides SEO. Should be no more than 160 characters. [Further reading](https://moz.com/learn/seo/meta-description).
43
- `navigation_weight` | N/A | A hint to position the topic in the navbar where a particular position is preferred. The lower the number used the higher in the navbar the item will appear. Overrides information defined in `config/navigation.yml`. In most cases you only need to add a `navigation_weight` item if your topic is not automatically displayed in your preferred position in the navbar.
37
+ | Metadata | HTML generated | Description |
38
+ | ------------------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
39
+ | `title` | N/A | This is the title for the topic that will be displayed in the navbar. This main be different to that display at the top of the topic. It is displayed in the Algolia search results when you search NDP. |
40
+ | `description` | N/A | This is the short description for the topic. It is displayed in the Algolia search results when you search NDP. It should indicate the nature of the content of the topic. |
41
+ | `meta_title` | `<head><title>The title</title>...</head>` | Used for SEO in external search engine results. This should be more descriptive than the `title` to provide additional context in the absence of the navbar. [Further reading](https://moz.com/learn/seo/title-tag). |
42
+ | `meta_description` | `<head><meta name="description" content="The description">...</head>` | Used in external search engine results. Provides SEO. Should be no more than 160 characters. [Further reading](https://moz.com/learn/seo/meta-description). |
43
+ | `navigation_weight` | N/A | A hint to position the topic in the navbar where a particular position is preferred. The lower the number used the higher in the navbar the item will appear. Overrides information defined in `config/navigation.yml`. In most cases you only need to add a `navigation_weight` item if your topic is not automatically displayed in your preferred position in the navbar. |
44
44
 
45
45
  ### Example
46
46
 
@@ -62,15 +62,15 @@ When using `title` bear in mind that while something like "Overview" may be fine
62
62
 
63
63
  Ideally task (step) or other active topics should include a gerund. For example:
64
64
 
65
- * Installing the Vonage Command Line Interface (CLI)
65
+ - Installing the Vonage Command Line Interface (CLI)
66
66
 
67
67
  Topics providing reference information would have a noun-based title, for example:
68
68
 
69
- * The Conversation object
69
+ - The Conversation object
70
70
 
71
71
  To provide greater context in external search results a corresponding `meta_title` might contain much more specific information, for example:
72
72
 
73
- * The Vonage Conversation API Conversation object
73
+ - The Vonage Conversation API Conversation object
74
74
 
75
75
  ### Writing an effective `description`
76
76
 
@@ -89,7 +89,9 @@ This appears in external search engine results. While navbar titles such as "Ove
89
89
  **Headings**
90
90
 
91
91
  # I am a H1
92
+
92
93
  ## I am a H2
94
+
93
95
  ### I am a H3
94
96
 
95
97
  > Custom extension: Headings have their own slugified ID's for deep linking. For example the `h1` has an ID of `i-am-a-h1`
@@ -100,7 +102,7 @@ Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia od
100
102
 
101
103
  **Inline styles**
102
104
 
103
- Text can be **bold**, *italic* or ***bold and italic***. You could use ~~strikethrough~~ but please don't.
105
+ Text can be **bold**, _italic_ or **_bold and italic_**. You could use ~~strikethrough~~ but please don't.
104
106
 
105
107
  You can define inline `code block` with backticks.
106
108
 
@@ -152,13 +154,13 @@ Find out ^[more](Tooltips are useful for when you have more information to conve
152
154
  >
153
155
  > Indentations are 4 spaces.
154
156
 
155
- * Alpha
156
- * Bravo
157
- * Charlie
158
- * Delta
159
- * Echo
160
- * Foxtrot
161
- * Golf
157
+ - Alpha
158
+ - Bravo
159
+ - Charlie
160
+ - Delta
161
+ - Echo
162
+ - Foxtrot
163
+ - Golf
162
164
 
163
165
  **Ordered Lists**
164
166
 
@@ -171,7 +173,7 @@ Find out ^[more](Tooltips are useful for when you have more information to conve
171
173
  1. Three
172
174
  2. Four
173
175
  1. Five
174
- 1. Six
176
+ 3. Six
175
177
  3. Seven
176
178
 
177
179
  ## Code
@@ -184,11 +186,11 @@ See our detailed [code examples guide](/contribute/guides/code-examples) for adv
184
186
  >
185
187
  > You'll have to view the `markdown-guide.md` source to see how since showing you the syntax would result in it being processed.
186
188
 
187
- Key | Description
188
- -- | --
189
- `TO_NUMBER` | The number you are sending the SMS to
190
- `API_KEY` | You can find this in your [account overview](https://dashboard.nexmo.com/account-overview)
191
- `API_SECRET` | You can find this in your [account overview](https://dashboard.nexmo.com/account-overview)
189
+ | Key | Description |
190
+ | ------------ | ------------------------------------------------------------------------------------------ |
191
+ | `TO_NUMBER` | The number you are sending the SMS to |
192
+ | `API_KEY` | You can find this in your [account overview](https://dashboard.nexmo.com/account-overview) |
193
+ | `API_SECRET` | You can find this in your [account overview](https://dashboard.nexmo.com/account-overview) |
192
194
 
193
195
  ## Tabbed Content (custom plugin)
194
196
 
@@ -229,10 +231,10 @@ Note that `tabbed` is set to `true` for tabbed folder content.
229
231
 
230
232
  Example files can be found in the folder `_documentation/en/client-sdk/setup/add-sdk-to-your-app`:
231
233
 
232
- * `.config.yml`
233
- * `android.md`
234
- * `ios.md`
235
- * `javascript.md`
234
+ - `.config.yml`
235
+ - `android.md`
236
+ - `ios.md`
237
+ - `javascript.md`
236
238
 
237
239
  The rendered output can be found [here](/client-sdk/setup/add-sdk-to-your-app/javascript).
238
240
 
@@ -288,21 +290,21 @@ Andrew->>China: I am good thanks!
288
290
 
289
291
  Inline [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) support, using both primary language tags and subtags, is provided using the following syntax.
290
292
 
291
- Language | Key | Text
292
- -- | -- | --
293
- English | none | Hello World
294
- Spanish | `es` | [Hola Mundo](lang: 'es')
295
- French | `fr` | [Bonjour le monde](lang: 'fr')
296
- Brazilian Portuguese | `pt-BR` | [Olá Mundo](lang: 'pt-BR')
297
- Hebrew | `il` | [שלום עולם](lang: 'il')
293
+ | Language | Key | Text |
294
+ | -------------------- | ------- | ------------------------------ |
295
+ | English | none | Hello World |
296
+ | Spanish | `es` | [Hola Mundo](lang: "es") |
297
+ | French | `fr` | [Bonjour le monde](lang: "fr") |
298
+ | Brazilian Portuguese | `pt-BR` | [Olá Mundo](lang: "pt-BR") |
299
+ | Hebrew | `il` | [שלום עולם](lang: "il") |
298
300
 
299
301
  ## Anchors (custom plugin)
300
302
 
301
303
  Adding custom anchors and retaining support for old headings can be done as such:
302
304
 
303
- ````
305
+ ```
304
306
  ⚓ This is the old heading
305
- ````
307
+ ```
306
308
 
307
309
  This would produce the following HTML:
308
310
 
@@ -312,12 +314,12 @@ This would produce the following HTML:
312
314
 
313
315
  If you are adding support for a changed header this would normally go above the old heading as such:
314
316
 
315
- ````
317
+ ```
316
318
  ⚓ Send with Short Message Service
317
319
  ⚓ Send with SMS
318
320
 
319
321
  # Sending an SMS
320
- ````
322
+ ```
321
323
 
322
324
  ### Example
323
325
 
@@ -365,9 +367,9 @@ image: public/assets/screenshots/da5f952d465355c19eb888fa1049844b31e090c2.png
365
367
 
366
368
  The HTML `<audio>` element can be utilised in Markdown with the following syntax:
367
369
 
368
- ````
370
+ ```
369
371
  🔈[https://developer.nexmo.com.s3.amazonaws.com/assets/ssml/06-phonemes.mp3]
370
- ````
372
+ ```
371
373
 
372
374
  This produces the following output:
373
375
 
@@ -377,9 +379,9 @@ This produces the following output:
377
379
 
378
380
  You can use syntax such as:
379
381
 
380
- ````
382
+ ```
381
383
  Welcome to [~dynamic_content_example~]
382
- ````
384
+ ```
383
385
 
384
386
  This will render as:
385
387
 
@@ -405,7 +407,7 @@ Alternatively, you can specify the concepts to list manually if you need to show
405
407
 
406
408
  ````
407
409
  ```concept_list
408
- concepts:
410
+ concepts:
409
411
  - voice/voice-api/call-flow
410
412
  - messaging/sms/delivery-receipts
411
413
  ```
@@ -414,7 +416,27 @@ concepts:
414
416
  This produces the following output:
415
417
 
416
418
  ```concept_list
417
- concepts:
419
+ concepts:
418
420
  - voice/voice-api/call-flow
419
421
  - messaging/sms/delivery-receipts
420
422
  ```
423
+
424
+ ## Snippet Variables (custom plugin)
425
+
426
+ When writing a code snippet, you may need to define variables that the snippet will use and provide a description of each. The description will be shown in the selected language if a translation is available.
427
+
428
+ The variables are defined in `config/code_snippet_variables.yml`
429
+
430
+ ````
431
+ ```snippet_variables
432
+ - NEXMO_API_KEY
433
+ - TO_NUMBER
434
+ ```
435
+ ````
436
+
437
+ Produces the following output:
438
+
439
+ ```snippet_variables
440
+ - NEXMO_API_KEY
441
+ - TO_NUMBER
442
+ ```