doc: cookbook tweaks, simpler titles
Also drop the main heading from the big manual again, it disrupted the TOC style. [ci skip]
This commit is contained in:
		
							parent
							
								
									4d91013182
								
							
						
					
					
						commit
						d4654d46af
					
				
							
								
								
									
										13
									
								
								Shake.hs
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								Shake.hs
									
									
									
									
									
								
							| @ -133,8 +133,12 @@ main = do | |||||||
| 
 | 
 | ||||||
|       -- cookbook pages in markdown, ready for web output by hakyll (site/csv-import.md). |       -- cookbook pages in markdown, ready for web output by hakyll (site/csv-import.md). | ||||||
|       -- Keeping these in the main site directory allows hakyll-std to see them (and simpler urls). |       -- Keeping these in the main site directory allows hakyll-std to see them (and simpler urls). | ||||||
|       -- These should be ordered like the links on the docs page, so that the combined |       -- These should be kept ordered like the links on the docs page, so that the  | ||||||
|       -- cookbook follows the same order. |       -- combined cookbook follows the same order. | ||||||
|  |       -- XXX This, as well as keeping page link, heading, and filename synced, will be a bit tricky. | ||||||
|  |       -- Current policy: | ||||||
|  |       -- filenames are simple and stable as possible, beginning with TOPIC- prefix when appropriate | ||||||
|  |       -- titles are succinct and practical/action-oriented  | ||||||
|       cookbookpages = [ |       cookbookpages = [ | ||||||
|          "site/entries.md" |          "site/entries.md" | ||||||
|         ,"site/csv-import.md" |         ,"site/csv-import.md" | ||||||
| @ -265,7 +269,8 @@ main = do | |||||||
| 
 | 
 | ||||||
|     webmanall %> \out -> do |     webmanall %> \out -> do | ||||||
|       need webmanpages |       need webmanpages | ||||||
|       liftIO $ writeFile webmanall "# Big Manual\n\n* toc\n\n" |       -- avoid # Big Manual\n\n heading which will throw off the TOC style | ||||||
|  |       liftIO $ writeFile webmanall "* toc\n\n" | ||||||
|       forM_ webmanpages $ \f -> do -- site/hledger.md, site/journal.md |       forM_ webmanpages $ \f -> do -- site/hledger.md, site/journal.md | ||||||
|         cmd Shell ("printf '\\n\\n' >>") webmanall :: Action ExitCode |         cmd Shell ("printf '\\n\\n' >>") webmanall :: Action ExitCode | ||||||
|         cmd Shell "pandoc" f "-t markdown --atx-headers" |         cmd Shell "pandoc" f "-t markdown --atx-headers" | ||||||
| @ -279,7 +284,7 @@ main = do | |||||||
|     phony "cookbookall" $ need [ cookbookall ] |     phony "cookbookall" $ need [ cookbookall ] | ||||||
| 
 | 
 | ||||||
|     cookbookall %> \out -> do |     cookbookall %> \out -> do | ||||||
|       need cookbookpages |       need cookbookpages  -- XXX seems not to work, not rebuilt when a recipe changes  | ||||||
|       liftIO $ writeFile cookbookall "# User Cookbook\n\n* toc\n\n" |       liftIO $ writeFile cookbookall "# User Cookbook\n\n* toc\n\n" | ||||||
|       forM_ cookbookpages $ \f -> do -- site/csv-import.md, site/account-aliases.md, ... |       forM_ cookbookpages $ \f -> do -- site/csv-import.md, site/account-aliases.md, ... | ||||||
|         cmd Shell ("printf '\\n\\n' >>") cookbookall :: Action ExitCode |         cmd Shell ("printf '\\n\\n' >>") cookbookall :: Action ExitCode | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| # How to use account aliases | # Rewrite account names | ||||||
| 
 | 
 | ||||||
| Here's an example of using [account aliases](manual.html#account-aliases). | Here's an example of using [account aliases](manual.html#account-aliases). | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| # How to use another account separator character | # Use another account separator character | ||||||
| 
 | 
 | ||||||
| [Timedot format](manual.html#timedot) makes me want to use dots (`.`) for separating account components, instead of colon (`:`).  | [Timedot format](manual.html#timedot) makes me want to use dots (`.`) for separating account components, instead of colon (`:`).  | ||||||
| For example, instead of `fos:hledger:timedot` I'd like to write `fos.hledger.timedot`. | For example, instead of `fos:hledger:timedot` I'd like to write `fos.hledger.timedot`. | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| # How to read CSV files | # Convert CSV files | ||||||
| 
 | 
 | ||||||
| Here's a quick example of [converting a CSV file](manual.html#csv-format). | Here's a quick example of [converting a CSV file](manual.html#csv-format). | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -90,9 +90,9 @@ Practical recipes on one page, including: | |||||||
| <div style="padding-left:0em;"> | <div style="padding-left:0em;"> | ||||||
| 
 | 
 | ||||||
| [Common journal entries](entries.html)\ | [Common journal entries](entries.html)\ | ||||||
| [How to read CSV files](csv-import.html)\ | [Convert CSV files](csv-import.html)\ | ||||||
| [How to use account aliases](account-aliases.html)\ | [Rewrite account names](account-aliases.html)\ | ||||||
| [How to use another account separator character](account-separator.html)\ | [Use another account separator character](account-separator.html)\ | ||||||
| 
 | 
 | ||||||
| </div> | </div> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,12 +1,12 @@ | |||||||
| # Common Journal Entries | # Common journal entries | ||||||
| 
 | 
 | ||||||
| Example hledger journal entries for various kinds of transaction. | Example hledger journal entries for various kinds of transaction. | ||||||
|   |   | ||||||
| A purchase: | A purchase: | ||||||
|  | 
 | ||||||
| ```journal | ```journal | ||||||
| 2017/1/26 market | 2017/1/26 market | ||||||
|   expenses:food    $10 |   expenses:food    $10 | ||||||
|   assets:cash |   assets:cash | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| Please add more. |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user