fix settings bug
This commit is contained in:
		
							parent
							
								
									ade37da060
								
							
						
					
					
						commit
						4e212fe2a5
					
				
							
								
								
									
										6
									
								
								cms.go
								
								
								
								
							
							
						
						
									
										6
									
								
								cms.go
								
								
								
								
							| 
						 | 
					@ -72,15 +72,15 @@ func (h CaddyCMS) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error)
 | 
				
			||||||
		if r.URL.Path == "/admin/settings/" {
 | 
							if r.URL.Path == "/admin/settings/" {
 | 
				
			||||||
			var frontmatter string
 | 
								var frontmatter string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if _, err := os.Stat("config.yaml"); err == nil {
 | 
								if _, err := os.Stat(h.Config.Path + "config.yaml"); err == nil {
 | 
				
			||||||
				frontmatter = "yaml"
 | 
									frontmatter = "yaml"
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if _, err := os.Stat("config.json"); err == nil {
 | 
								if _, err := os.Stat(h.Config.Path + "config.json"); err == nil {
 | 
				
			||||||
				frontmatter = "json"
 | 
									frontmatter = "json"
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if _, err := os.Stat("config.toml"); err == nil {
 | 
								if _, err := os.Stat(h.Config.Path + "config.toml"); err == nil {
 | 
				
			||||||
				frontmatter = "toml"
 | 
									frontmatter = "toml"
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue