Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit 74af0af

Browse files
authored
Merge pull request #6 from binary-com/master
Update from master
2 parents 4a01b0a + 2d2b27d commit 74af0af

55 files changed

Lines changed: 2215 additions & 1509 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build/copy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
src: [
77
'index.html',
88
'404.html',
9-
'sitemap.xml',
9+
'sitemap*.xml',
1010
'robots.txt'
1111
],
1212
dest: global.dist

robots.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
User-agent: *
2-
Sitemap: https://www.binary.me/sitemap.xml

scripts/js_texts/extracted_strings_app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ module.exports = [
5050
'Closed Bid',
5151
'Closes',
5252
'Commodities',
53+
'Compressing Image',
5354
'Connecting to server',
5455
'Connection error: Please check your internet connection.',
5556
'Contract',
@@ -256,6 +257,7 @@ module.exports = [
256257
'Please complete your [_1]personal details[_2] before you proceed.',
257258
'Please confirm that all the information above is true and complete.',
258259
'Please confirm that you are not a politically exposed person.',
260+
'Please ensure that you have the Telegram app installed on your device.',
259261
'Please enter a valid Login ID.',
260262
'Please log in.',
261263
'Please reload the page',

scripts/sitemap.js

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,37 @@ program
1313
.description('Generate sitemap.xml')
1414
.parse(process.argv);
1515

16-
const url_prefix = 'https://www.binary.me/';
17-
const filename = 'sitemap.xml';
18-
let excluded = 0;
16+
const config = [
17+
{
18+
url_prefix : 'https://www.binary.com/',
19+
filename : 'sitemap.xml',
20+
lang_filter: '^(?!id$)',
21+
},
22+
{
23+
url_prefix : 'https://www.binary.me/',
24+
filename : 'sitemap.id.xml',
25+
lang_filter: '^id$',
26+
},
27+
];
28+
let excluded;
1929

20-
const createSitemap = () => {
30+
const getApplicableLanguages = (lang_filter) => common.languages.filter(lang => new RegExp(lang_filter, 'i').test(lang));
31+
32+
const createSitemap = (conf) => {
33+
excluded = 0;
34+
2135
const sitemap = Sitemap.createSitemap({
22-
hostname : url_prefix,
36+
hostname : conf.url_prefix,
2337
cacheTime: 600000,
2438
});
2539

26-
common.languages
40+
getApplicableLanguages(conf.lang_filter)
2741
.map(lang => lang.toLowerCase())
2842
.forEach((lang) => {
2943
urls.forEach((entry) => {
3044
if (!common.isExcluded(entry[3], lang)) {
3145
sitemap.add({
32-
url : `${url_prefix}${lang}/${entry[0]}.html`,
46+
url : `${conf.url_prefix}${lang}/${entry[0]}.html`,
3347
changefreq: entry[1],
3448
priority : entry[2],
3549
});
@@ -39,15 +53,19 @@ const createSitemap = () => {
3953
});
4054
});
4155

42-
fs.writeFileSync(Path.join(common.root_path, filename), sitemap.toString());
56+
fs.writeFileSync(Path.join(common.root_path, conf.filename), sitemap.toString());
4357
};
4458

45-
const start = Date.now();
46-
process.stdout.write(common.messageStart(`Generating ${filename}`));
47-
createSitemap();
48-
process.stdout.write(common.messageEnd(Date.now() - start));
59+
config.forEach((conf) => {
60+
const start = Date.now();
61+
process.stdout.write(common.messageStart(`Generating ${conf.filename}`));
62+
63+
createSitemap(conf);
64+
65+
process.stdout.write(common.messageEnd(Date.now() - start));
4966

50-
// Report details
51-
const langs_count = common.languages.length;
52-
const total_count = langs_count * urls.length - excluded;
53-
console.log(` ${color.green(total_count)} URL nodes total (${color.cyan(langs_count)} Languages ${color.yellowBright('*')} ${color.cyan(urls.length)} URLs ${color.yellowBright('-')} ${color.cyan(excluded)} Excluded)`); // eslint-disable-line no-console
67+
// Report details
68+
const langs_count = getApplicableLanguages(conf.lang_filter).length;
69+
const total_count = langs_count * urls.length - excluded;
70+
console.log(` ${color.green(total_count)} URL nodes total (${color.cyan(langs_count)} Languages ${color.yellowBright('*')} ${color.cyan(urls.length)} URLs ${color.yellowBright('-')} ${color.cyan(excluded)} Excluded)\n`); // eslint-disable-line no-console
71+
});

sitemap.id.xml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
3+
<url> <loc>https://www.binary.me/id/home.html</loc> <changefreq>monthly</changefreq> <priority>1.0</priority> </url>
4+
<url> <loc>https://www.binary.me/id/tour.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
5+
<url> <loc>https://www.binary.me/id/why-us.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
6+
<url> <loc>https://www.binary.me/id/platforms.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
7+
<url> <loc>https://www.binary.me/id/about-us.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
8+
<url> <loc>https://www.binary.me/id/binary-in-numbers.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
9+
<url> <loc>https://www.binary.me/id/careers.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
10+
<url> <loc>https://www.binary.me/id/contact.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
11+
<url> <loc>https://www.binary.me/id/group-history.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
12+
<url> <loc>https://www.binary.me/id/open-positions.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
13+
<url> <loc>https://www.binary.me/id/open-positions/job-details.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
14+
<url> <loc>https://www.binary.me/id/affiliate/signup.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
15+
<url> <loc>https://www.binary.me/id/charity.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
16+
<url> <loc>https://www.binary.me/id/legal/us_patents.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
17+
<url> <loc>https://www.binary.me/id/responsible-trading.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
18+
<url> <loc>https://www.binary.me/id/terms-and-conditions.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
19+
<url> <loc>https://www.binary.me/id/liquidity-solutions.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
20+
<url> <loc>https://www.binary.me/id/multiple-accounts-manager.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
21+
<url> <loc>https://www.binary.me/id/open-source-projects.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
22+
<url> <loc>https://www.binary.me/id/partners.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
23+
<url> <loc>https://www.binary.me/id/payment-agent.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
24+
<url> <loc>https://www.binary.me/id/security-testing.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
25+
<url> <loc>https://www.binary.me/id/get-started.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
26+
<url> <loc>https://www.binary.me/id/get-started/binary-options.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
27+
<url> <loc>https://www.binary.me/id/get-started/cfds.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
28+
<url> <loc>https://www.binary.me/id/get-started/cryptocurrencies.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
29+
<url> <loc>https://www.binary.me/id/get-started/forex.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
30+
<url> <loc>https://www.binary.me/id/get-started/metals.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
31+
<url> <loc>https://www.binary.me/id/metatrader/download.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
32+
<url> <loc>https://www.binary.me/id/metatrader/how-to-trade-mt5.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
33+
<url> <loc>https://www.binary.me/id/metatrader/types-of-accounts.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
34+
<url> <loc>https://www.binary.me/id/cashier.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
35+
<url> <loc>https://www.binary.me/id/cashier/payment_agent_listws.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
36+
<url> <loc>https://www.binary.me/id/cashier/payment_methods.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
37+
<url> <loc>https://www.binary.me/id/trading.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
38+
<url> <loc>https://www.binary.me/id/multi_barriers_trading.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
39+
<url> <loc>https://www.binary.me/id/resources/asset_indexws.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
40+
<url> <loc>https://www.binary.me/id/resources/market_timesws.html</loc> <changefreq>monthly</changefreq> <priority>0.8</priority> </url>
41+
</urlset>

0 commit comments

Comments
 (0)