Skip to content

Commit

Permalink
feat: update template name
Browse files Browse the repository at this point in the history
  • Loading branch information
Licoy committed Jun 17, 2022
1 parent ae397fd commit 32d9619
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fetch_hosts.go
Expand Up @@ -95,7 +95,7 @@ func ServerFetchHosts() (err error) {
}

var templateFile []byte
templateFile, err = ioutil.ReadFile(execDir + "/index-template.html")
templateFile, err = ioutil.ReadFile(execDir + "/index.template")
if err != nil {
err = ComposeError("读取首页模板文件失败", err)
return
Expand Down
2 changes: 1 addition & 1 deletion fetch_hosts.php
Expand Up @@ -14,7 +14,7 @@
$utc_date = date('c');
$hosts_content .= "# last fetch time: $utc_date\n# update url: https://hosts.gitcdn.top/hosts.txt\n# fetch-github-hosts end\n\n";

$template = file_get_contents('index-template.php');
$template = file_get_contents('index.template');
file_put_contents('index.html', str_replace('<!--time-->', $utc_date, $template));
file_put_contents('hosts.txt', $hosts_content);
file_put_contents('hosts.json', json_encode($github_hosts));
Expand Down
File renamed without changes.

0 comments on commit 32d9619

Please sign in to comment.