-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtest.rb
25 lines (25 loc) · 874 Bytes
/
test.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
data_hash.each do |array|
host = data_hash[i]["host"]
name = data_hash[i]["name"]
doc = data_hash[i]["doc"]
# permalink = data_map[host] || "/services/:title/"
png = Dir.glob("assets/img/2fa-services/Icons/#{host}.png").first()
svg = Dir.glob("assets/img/2fa-services/Icons/#{host}.svg").first()
img = png.nil? == true ? svg : png
File.open("_services/#{host}.html", "w") {|f| f.write(
"---
layout: cover
title: Authenticator App for #{name}
description: How to enable Two-Factor Authentication for #{name} using Authenticator App by 2Stable for #{name}
permalink: /services/:title/
index: #{i}
tags: '2fa totp'
service-name: #{name}
image:
path: https://authenticator.2stable.com/#{img}
alt: Authenticator App for #{name}
---
<div class="+'"container"'+">{% include service.html %}</div>"
)}
i += 1
end