Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-01-23Fix RelPermalink() and Urls in menus vs canonifyUrlsbep
canonifyUrls=true, RelPermalink and baseUrl with sub-path did not work. This fixes that by adding a check for canonifyUrl=trues=true in RelPermalink(). So given - baseUrl "http://somehost.com/sub/" - the path "some-path/file.html" For canonifyUrls=false RelPermalink() returns "/sub/some-path/file.html" For canonifyUrls=true RelPermalink() returns "/some-path/file.html" In the last case, the Url will be made absolute and clickable in a later step. This commit also makes the menu urls defined in site config releative. To make them work with canonifying of urls, the context root is prepended if canonifying is turned off. Fixes #519 Fixes #711
2015-01-21Register rstHandler to restore experimental reST supportAnthony Fok
(Experimental) reStructuredText support was working in v0.12, but was no longer handled after some refactoring in v0.13-DEV. That experimental support is now restored. Furthermore, check for both rst2html and rst2html.py in the PATH, and execute whichever is found. See #472 for more information.
2015-01-20Minor polish in path/urlbep
2015-01-20Add more tests to general helperbep
2015-01-09Moved a test regarding a content.go function to a new test file content_test.go.Marek Stanley
Added some tests for general helpers, especially as a way to document the expected behavior, and as a warm-up welcome contribution.
2015-01-05Rename to plainIdAnchorsJacob Gillespie
2015-01-05Group both options under Blackfriday: documentIDAnchorJacob Gillespie
2015-01-05Add config options: disable footnote anchor prefix and header ID suffixJacob Gillespie
New config options: * DisableFootnoteAnchorPrefix - bool - default: false * DisableHeaderIDSuffix - bool - default: false
2014-12-26Wrap comments helpers package to fit 80-column widthAnthony Fok
Add an initial space after `//` where appropriate. Minor copyediting.
2014-12-26Add configurable support for angled quotesbep
The flag `HTML_SMARTYPANTS_ANGLED_QUOTES` was added to Blackfriday on Black Friday. This configures rendering of double quotes as angled left and right quotes (« »). Typical use cases would be either or, or combined, but never in the same document. As an example would be a person from Norway; he has a blog in both English and Norwegian (his native tongue); he would then configure Blackfriday to use angled quotes for the Norwegian section, but keep them as reqular double quotes for the English. This commit adds configuration support for this new flag, configuration that can be set in the site configuration, but overridden in page front matter. Fixes #605
2014-12-19Commented helpers packageAhsanul Haque
2014-12-11Commenting helpers packageAhsanul Haque
2014-12-09Fix various Windows-issuesbep
File handling was broken on Windows. This commit contains a revision of the path handling with separation of file paths and urls where needed. There may be remaining issues and there may be better ways to do this, but it is easier to start that refactoring job with a set of passing tests. Fixes #687 Fixes #660
2014-11-25Enable descriptive header IDs.Austin Ziegler
Enable blackfriday.EXTENSION_AUTO_HEADER_IDS to generate the name of the header ID from the text in the header. Works for prefix and underline headers. - TOC extraction had to be modified to look for `<li><a href="#`> instead of `#toc_` because of this change. - Fixed a number of tests that depended on the presence of `toc_` with as an `id` or as a `href` value. - Renames the earlier parameter `footnoteref` to `documentId` as it more accurately represents the nature of the parameter. The `documentId` is appended to all generated headers through the new HTML renderer parameter `HeaderIDSuffix`.
2014-11-18Shortcode rewrite, take 2bep
This commit contains a restructuring and partial rewrite of the shortcode handling. Prior to this commit rendering of the page content was mingled with handling of the shortcodes. This led to several oddities. The new flow is: 1. Shortcodes are extracted from page and replaced with placeholders. 2. Shortcodes are processed and rendered 3. Page is processed 4. The placeholders are replaced with the rendered shortcodes The handling of summaries is also made simpler by this. This commit also introduces some other chenges: 1. distinction between shortcodes that need further processing and those who do not: * `{{< >}}`: Typically raw HTML. Will not be processed. * `{{% %}}`: Will be processed by the page's markup engine (Markdown or (infuture) Asciidoctor) The above also involves a new shortcode-parser, with lexical scanning inspired by Rob Pike's talk called "Lexical Scanning in Go", which should be easier to understand, give better error messages and perform better. 2. If you want to exclude a shortcode from being processed (for documentation etc.), the inner part of the shorcode must be commented out, i.e. `{{%/* movie 47238zzb */%}}`. See the updated shortcode section in the documentation for further examples. The new parser supports nested shortcodes. This isn't new, but has two related design choices worth mentioning: * The shortcodes will be rendered individually, so If both `{{< >}}` and `{{% %}}` are used in the nested hierarchy, one will be passed through the page's markdown processor, the other not. * To avoid potential costly overhead of always looking far ahead for a possible closing tag, this implementation looks at the template itself, and is branded as a container with inner content if it contains a reference to `.Inner` Fixes #565 Fixes #480 Fixes #461 And probably some others.
2014-11-14Reinsert deleted testbep
This test was deleted by mistake in owenwaller's contribution to add more tests. I haven't looked closer, there may be more missing.
2014-11-14converted helpers usage of path 2 filepathJoel Scoble
2014-11-05Fixing some testsspf13
2014-11-05Updating tests to use hugofsspf13
2014-11-05rewriting guessSection to accurately reflect intent and usage. Update tests.spf13
2014-11-05First stab at correcting GuessSection testsOwen Waller
Updated the test to correctly test for "" when a non-absolute path is used. But the tests still fail for multi-part paths e.g. /contents/blog/
2014-11-05Fix: rewrite FileAndExtOwen Waller
FileAndExt has now be completely rewritten and now works as may reasonably be expected. The test cases for: ReplaceExtension Filename FileAndExt now all pass. The problem was the way path.Base was being used. Firstly Base returns "." if the directory is empty, but it can also return "." for the current directory, or ".." for the parent directory, if these are the last elements in the path. Simply detecting the presence of a "." in the returned string and truncating before the "." does not therefore always result in a valid filename. Secondly, Base strips any trailing slashes making is more difficult to detect when the path does not end in a filename but in a directory name i.e. a no filename case. Not detecting this incorrectly results in the last directory name being returned as the filename. The code has been updated to take account of of both situations so that: 1) An empty string for both the filename and extension is returned if the path does not contain a filename (plus an optional extension). This includes both the empty path case, and the ends in a directory case. 2) If the path represents a filename with an extension then both the filename and the extension (minus any dots) are returned as non empty strings. 3) If the path represents a filename without an extension then filename will be returned as a non empty string (minus any dot) and the extension will be returned as an empty string.
2014-11-05Fix: remove the unnecessary dot in an extensionOwen Waller
Oops minor typo. The new extension passed to ReplaceExtension should not have a dot in it. The test data bas been updated to reflect this.
2014-11-05Updated TestReplaceExtensioni, TestFilename and TestFileAndExtOwen Waller
Updated the test cases in TestReplaceExtension to reflect the intent of ReplaceExtension which is to accept a path and return only the file name with a new extension. It's intentionally designed to strip out the path and only provide the filename Additional test cases have been added to both TestFilename and TestFileAndExt to clarify behaviour with relative paths.
2014-11-05WriteToDisk and SafeWriteToDisk test cleaned upOwen Waller
Minor cleanup to randomise the names of the temp directories used by the tests.
2014-11-05WriteToDisk and SafeWriteToDisk tests now passOwen Waller
This is the first time that both the WriteToDisk and SafeWriteToDisk tests pass
2014-11-05Fix: Test TestSafeWriteToDisk now worksOwen Waller
Oops, my bad. Despite the function intending to test SafeWriteToDisk it was actually calling WriteToDisk. WriteToDisk does not return the file exists error that SafeWriteToDisk does, which the test checks for.
2014-11-05Added the path modules test filesOwen Waller
Added the new path modules test file. This replaces the old helpers_test.go file. The currently failing tests are: TestReplaceExtension TestFilename TestFileAndExt TestGuessSection TestFindCWD TestWriteToDisk In addition the TestSafeWriteToDisk test case is currently disabled. It will panic if enabled. In addition there are some minor changes to path.go. They are: Refactored MakePathToLower to simplify it. Commented out, pending removal, Sanitize as it appears to be unused. Fixed the resource leak in UnicodeSanitize Conflicts: helpers/path.go
2014-11-05Added the url modules test files.Owen Waller
Added the new url module test file. This replaces the original helpers_test.go file. The TestUrlPrep test currently fails. The only minor change to url.go is to add some trace printf's to UrlPrep.
2014-11-04Added the general modules test filesOwen Waller
Added the new general module's test file, general_test.go. This replaces the helpers_test.go file. There is also a minor defect fix in general.go's StripHTML function. The correct xhtml tag for a break is <br /> not </br>. I've also removed the unnecessary spaces before the replacement "\n". The new test module also reflects this change. Conflicts: helpers/general.go
2014-11-04Remove the helpers_test.go fileOwen Waller
The helpers_test.go file has been split into three new test files, one each for the path, url and general modules. Conflicts: helpers/helpers_test.go
2014-11-04Adding ReaderTo and ToReader helper functionsspf13
2014-11-01Migrating Hugo to Afero for filesystem calls.spf13
2014-10-21Handlers WIP - Convert now workingspf13
2014-10-17Big refactor of how source files are used. Also added default destination ↵spf13
extension option.
2014-10-15Fix spf13/hugo#467. RSSLink now point to index.xmlJian Zhou
2014-09-12Enable soft livereload of CSS and imagesbep
Prior to this commit a dummy JavaScript filename was sent to LiveReload when changing a static file (CSS, image etc.), forcing a full browser reload of the page. This commit fixes this by sending the relative file path of the changed static resource, enabling partial live reloading for CSS- and image-changes. If more than one static file happens to end up in the same changeevent-batch, it will fall back to do a full refresh. To enable this logic, the change events with names ending with ".goutputstream*" is now filtered out as temporary. Changes in dynamic content behaves like before. Issue #490
2014-09-08Go back to lowercase slugs. Also, use MakePathToLower in TestMakeToLower.Jakub Turski
go fmt
2014-08-25Fix #302. Links now have trailing slashes.spf13
2014-08-25Support subdir in baseurl.Nate Finch
Mainly this was a change to helpers.MakePermalink, but to get the local server to run correctly, we needed to redirect the path of the request from /foo to /. In addition, I added tests for the server's code for fixing up the base url with different config file & CLI options.
2014-08-25preserve alias case while lowercasing taxonomyJoel Scoble
2014-05-19new site works in an empty directory nowspf13
2014-05-16Better handling of when the specified port is already in usespf13
2014-05-10Add pygmentsstyle and pygmentsuseclasses optionsLK4D4
Fixes #204 Conflicts: commands/hugo.go
2014-05-02Adding some new methods to helpers (GuessSection, MakeTitle & Filename)spf13
2014-05-01moving writeToDisk to helpers to make it more accessiblespf13
2014-04-27Little syntax mistakeLordFPL
2014-04-08strip trailing baseurl slash. Added a new template function "sanitizeurl" ↵spf13
which ensures no double slashes. Fixed #221
2014-04-05Hugo config abstracted into a general purpose config library called "Viper".spf13
Hugo casting now in own library called "cast"
2014-03-31Adding support for logging & verbose logging. Consolidation of error ↵spf13
handling. Integration of jWalterWeatherman library. Fixed #137