Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
monero-project
monero-site
Commits
df474233
Verified
Commit
df474233
authored
Feb 14, 2019
by
el00ruobuob
Browse files
Moneropedia ruby script tweak for 5 letter country code (ie. pt-br)
parent
999fe3ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
_plugins/moneropedia.rb
View file @
df474233
...
...
@@ -81,8 +81,13 @@ module Jekyll
# Getting language from tag, and cleaning it
if
content
.
include?
'@lang_tag_'
lang
=
content
[
/\@lang_tag_\w{2}/
][
-
2
,
2
].
downcase
content
=
content
.
gsub
(
/(\@lang_tag_\w{2}\n)/i
,
""
)
if
(
content
=~
/\@lang_tag_\w{2}-\w{2}/
)
lang
=
content
[
/\@lang_tag_\w{2}-\w{2}/
][
-
5
,
5
].
downcase
;
content
=
content
.
gsub
(
/(\@lang_tag_\w{2}-\w{2}\n)/i
,
""
)
else
lang
=
content
[
/\@lang_tag_\w{2}/
][
-
2
,
2
].
downcase
;
content
=
content
.
gsub
(
/(\@lang_tag_\w{2}\n)/i
,
""
)
end
# Jekyll.logger.warn YAML::dump(@@moneropedia_ordered)
if
content
.
include?
'@moneropedia_index'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment