Hugo v0.15 發布,日志調用工具
Hugo v0.15 發布, 更新如下:
新特性
-
new
</li>hugo import jekyll
command. 1469 -
The new
</li>Param
convenience method onPage
andNode
can be used to get the most specific parameter value for a given key. 1462 -
Several new information elements have been added to
</li>Page
andNode
:-
</li>RuneCount
: The number of runes in the content, excluding any whitespace. This may be a good alternative to.WordCount
for Japanese and other CJK languages where a word-split by spaces makes no sense. 1266 -
</li>RawContent
: Raw Markdown as a string. One use case may be of embedding remarkjs.com slides. -
</li> </ul> </ul>IsHome
: tells the truth about whether you're on the home page or not.提升
-
</li>hugo server
now builds ~30%+ faster by rendering to memory instead of disk. To get the old behavior, start the server with--renderToDisk=true
. -
Hugo now supports dynamic reloading of the config file when watching.
</li> -
We now use a custom-built
</li>LazyFileReader
for reading file contents, which means we don't read media files in/content
into memory anymore -- and file reading is now performed in parallel on multicore PCs. 1181 -
Hugo is now built with
</li>Go 1.5
which, among many other improvements, have fixed the last known data race in Hugo. 917 -
Paginator now also supports page groups. 1274
</li> -
Markdown improvements:
</li>-
Option to disable Blackfriday's
</li>Smartypants
. -
Option for Blackfriday to open links in a new window/tab. 1220
</li> -
Option to disable Blackfriday's LaTeX style dashes 1231
</li> -
Definition lists extension support.
</li> -
Hugo now supports GitHub-flavoured markdown code fences for highlighting for
</li>md
-files (Blackfriday rendered markdown) andmmark
files (MMark rendered markdown). 3621258 -
Several new Blackfriday options are added:
</li> </ul> -
</li>Scratch
now has built-inmap
support. -
We now fall back to
</li>link title
for the default page sort. 1299 -
Some notable new configuration options:
</li>-
</li>IgnoreFiles
can be set with a list of Regular Expressions that matches files to be ignored during build. 1189 -
</li> </ul>PreserveTaxonomyNames
, when set totrue
, will preserve what you type as the taxonomy name both in the folders created and the taxonomykey
, but it will be normalized for the URL. 1180 -
</li>hugo gen
can now generate man files, bash auto complete and markdown documentation -
Hugo will now make suggestions when a command is mistyped
</li> -
Shortcodes now have a boolean
</li> </ul>.IsNamedParams
property. 1597新模版特性
-
All template engines:
</li>-
The new
</li>dict
function that could be used to pass maps into a template.1463 -
The new
</li>pluralize
andsingularize
template funcs. -
The new
</li>base64Decode
andbase64Encode
template funcs. -
The
</li>sort
template func now accepts field/key chaining arguments and pointer values. 1330 -
Several fixes for
</li>slicestr
andsubstr
, most importantly, they now have fullutf-8
-support. 1190 1333 1347 -
The new
</li>last
template function allows the user to select the lastN
items of a slice. 1148 -
The new
</li>after
func allows the user to select the items after theNth
item. 1200 -
Add
</li>time.Time
type support to thewhere
,ge
,gt
,le
, andlt
template functions. -
It is now possible to use constructs like
</li>where Values ".Param.key" nil
to filter pages that doesn't have a particular parameter. 1232 -
</li>getJSON
/getCSV
: Add retry on invalid content. 1166 -
The new
</li>readDir
func lists local files. 1204 -
The new
</li>safeJS
function allows the embedding of content into JavaScript contexts in Go templates. -
Get the main site RSS link from any page by accessing the
</li> </ul>.Site.RSSLink
property. 1566 -
Ace templates:
</li>-
Base templates now also works in themes. 1215.
</li> -
And now also on Windows. 1178
</li> </ul> -
Full support for Amber templates including all template functions.
</li> -
A built-in template for Google Analytics. 1505
</li> -
Hugo is now shipped with new built-in shortcodes: 1576
</li>-
</li>油Tube
for 油Tube videos -
</li>vimeo
for Vimeo videos -
</li>gist
for GitHub gists -
</li>tweet
for 推ter Tweets -
</li> </ul> </ul>speakerdeck
for Speakerdeck slidesBug 修復
-
Fix data races in page sorting and page reversal. These operations are now also cached. 1293
</li> -
</li>page.HasMenuCurrent()
andnode.HasMenuCurrent()
now work correctly in multi-level nested menus. -
Support
</li>Fish and Chips
style section titles. Previously, this would end up asFish And Chips
. Now, the first character is made toupper, but the rest are preserved as-is. 1176 -
Hugo now removes superfluous p-tags around shortcodes. 1148
</li> </ul>注意
-
</li>hugo server
will watch by default now. -
Some fields and methods were deprecated in
</li>0.14
. These are now removed, so the error message isn't as friendly if you still use the old values. So please change:-
</li> </ul> </ul>getJson
togetJSON
,getCsv
togetCSV
,safeHtml
tosafeHTML
,safeCss
tosafeCSS
,safeUrl
tosafeURL
,Url
toURL
,UrlPath
toURLPath
,BaseUrl
toBaseURL
,Recent
toPages
.下載頁面:v0.15
hugo 是注釋驅動的方法,用來在調試的時候調用日志記錄。它用于打印函數信息及執行時間的工具,僅在debug模式生效。
來自:http://www.oschina.net/news/68393/hugo-0-15本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!
-
-
-
-
-
-
-
-
-
-
-