mirror of
				https://github.com/BBaoVanC/bobatheme.git
				synced 2025-10-31 01:53:30 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			473 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			473 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {{ $path := "" }}
 | |
| {{ $markdown := false }}
 | |
| {{ if .IsNamedParams }}
 | |
|     {{ $path = .Get "path" }}
 | |
|     {{ with .Get "markdown" }}
 | |
|         {{ $markdown = . }}
 | |
|     {{ end }}
 | |
| {{ else }}
 | |
|     {{ $path = .Get 0 }}
 | |
| {{ end }}
 | |
| 
 | |
| {{ with ($path | readFile) }}
 | |
|     {{ if $markdown }}
 | |
|         {{ $path | readFile | $.Page.RenderString (dict "display" "block") }}
 | |
|     {{ else }}
 | |
|         {{ $path | readFile }}
 | |
|     {{ end }}
 | |
| {{ else }}
 | |
|     {{ errorf "file not found: %s" $path }}
 | |
| {{ end }}
 |