fix: include custom css once more
This commit is contained in:
parent
7811a18e03
commit
976135fb6c
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
|
*.css
|
||||||
test
|
test
|
||||||
|
BIN
distribusi
BIN
distribusi
Binary file not shown.
@ -547,8 +547,6 @@ func mkDiv(c *cli.Context, mtype string, href, fname string, unknown bool) (stri
|
|||||||
// writeIndex writes a new index.html.
|
// writeIndex writes a new index.html.
|
||||||
func writeIndex(fpath string, html []string, styles string) error {
|
func writeIndex(fpath string, html []string, styles string) error {
|
||||||
body := fmt.Sprintf(htmlBody, generatedInDistribusi, "", strings.Join(html, "\n"))
|
body := fmt.Sprintf(htmlBody, generatedInDistribusi, "", strings.Join(html, "\n"))
|
||||||
HTMLPath := path.Join(fpath, "index.html")
|
|
||||||
contents := []byte(body)
|
|
||||||
|
|
||||||
if styles != "" {
|
if styles != "" {
|
||||||
absPath, err := filepath.Abs(styles)
|
absPath, err := filepath.Abs(styles)
|
||||||
@ -566,6 +564,9 @@ func writeIndex(fpath string, html []string, styles string) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HTMLPath := path.Join(fpath, "index.html")
|
||||||
|
contents := []byte(body)
|
||||||
|
|
||||||
if _, err := os.Stat(HTMLPath); err != nil {
|
if _, err := os.Stat(HTMLPath); err != nil {
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
if err := ioutil.WriteFile(HTMLPath, contents, 0644); err != nil {
|
if err := ioutil.WriteFile(HTMLPath, contents, 0644); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user