Skip to content

Commit 4165b58

Browse files
committed
Revert deletion of CNAME file
1 parent 6c5bf7c commit 4165b58

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

content/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
zarr.dev

content/_plugins/copy/lib/copy.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44
require 'fileutils'
55

66
class Copy
7+
def self.copy_cname(site)
8+
source_file = File.join(site.source, "CNAME")
9+
target_file = File.join(site.dest, "CNAME")
10+
FileUtils.copy(source_file, target_file)
11+
Jekyll.logger.info "\t\tSource: #{source_file.sub! site.source, "/content"}"
12+
Jekyll.logger.info "\t\tTarget: #{target_file.sub! site.dest, "/content"}"
13+
Jekyll.logger.info "\n"
14+
end
15+
716
def self.copy_data_folder_for_translations(site)
817
default_lang = site.config["default_language"]
918
source_dir = File.join(site.source, "_data", default_lang)
@@ -56,3 +65,8 @@ def self.copy_translations_to_data_folder(site)
5665
Jekyll.logger.info "\n\t# Copy translation files:\n"
5766
Copy.copy_translations_to_data_folder(site)
5867
end
68+
69+
Jekyll::Hooks.register :site, :post_write do |site|
70+
Jekyll.logger.info "\n\t# Copy CNAME file:\n"
71+
Copy.copy_cname(site)
72+
end

0 commit comments

Comments
 (0)