example: Add image asset.
* example/haunt.scm: Add static directory builder. * example/images/guile-banner.small.png: New file. * example/posts/foo.sxml: Render Guile banner image.
This commit is contained in:
		@@ -3,6 +3,7 @@
 | 
				
			|||||||
             (haunt asset)
 | 
					             (haunt asset)
 | 
				
			||||||
             (haunt builder blog)
 | 
					             (haunt builder blog)
 | 
				
			||||||
             (haunt builder atom)
 | 
					             (haunt builder atom)
 | 
				
			||||||
 | 
					             (haunt builder assets)
 | 
				
			||||||
             (srfi srfi-19))
 | 
					             (srfi srfi-19))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(site #:title "Built with Guile"
 | 
					(site #:title "Built with Guile"
 | 
				
			||||||
@@ -13,4 +14,5 @@
 | 
				
			|||||||
      #:readers (list sxml-reader html-reader)
 | 
					      #:readers (list sxml-reader html-reader)
 | 
				
			||||||
      #:builders (list (blog)
 | 
					      #:builders (list (blog)
 | 
				
			||||||
                       (atom-feed)
 | 
					                       (atom-feed)
 | 
				
			||||||
                       (atom-feeds-by-tag)))
 | 
					                       (atom-feeds-by-tag)
 | 
				
			||||||
 | 
					                       (static-directory "images")))
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										
											BIN
										
									
								
								example/images/guile-banner.small.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								example/images/guile-banner.small.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 20 KiB  | 
@@ -1,3 +1,5 @@
 | 
				
			|||||||
 | 
					;;; -*- scheme -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(use-modules (srfi srfi-41)
 | 
					(use-modules (srfi srfi-41)
 | 
				
			||||||
             (haunt utils))
 | 
					             (haunt utils))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -19,4 +21,6 @@ posts.  Here are the first "
 | 
				
			|||||||
       " fibonacci numbers, computed with SRFI-41!")
 | 
					       " fibonacci numbers, computed with SRFI-41!")
 | 
				
			||||||
    (pre ,(object->string
 | 
					    (pre ,(object->string
 | 
				
			||||||
           (stream->list
 | 
					           (stream->list
 | 
				
			||||||
            (stream-take count fib)))))))
 | 
					            (stream-take count fib))))
 | 
				
			||||||
 | 
					    (p "Guile Scheme is great, eh?")
 | 
				
			||||||
 | 
					    (img (@ (src "/images/guile-banner.small.png"))))))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user