Commit Graph

51 Commits

Author SHA1 Message Date
Ashwin Maroli
ba29de02d4 Make page excerpts consistent with doc excerpts (#8236)
Merge pull request 8236
2020-06-17 09:26:53 -04:00
Ashwin Maroli
ee20e844aa Don't generate excerpts for non-html pages (#8234)
Merge pull request 8234
2020-06-08 08:39:50 -04:00
Ashwin Maroli
03256d7b80 Revert re-introduction of PageDrop
Reverts commit 1bfb12b210.
2020-06-04 20:08:35 +05:30
Ashwin Maroli
1bfb12b210 Revert deletion of PageDrop
Reverts commit 8590ab0768.
Reverts commit 69154c2ef7.
2020-06-04 19:24:51 +05:30
Ashwin Maroli
8590ab0768 Revert introduction of PageDrop (#8221)
Merge pull request 8221
2020-06-04 08:54:16 -04:00
Ashwin Maroli
8b22c9dcd5 Disable page excerpts by default (#8222)
Merge pull request 8222
2020-06-04 04:57:10 -04:00
Ashwin Maroli
1ec3843130 Allow excerpts to be generated for Page objects (#7642)
Merge pull request 7642
2020-05-21 04:44:14 -04:00
Ashwin Maroli
b84ba5accc Add PageDrop to provide Liquid templates with data (#7992)
Merge pull request 7992
2020-03-26 09:39:47 -04:00
Ashwin Maroli
dedfb0748f Handle files with trailing dots in their basename (#7315)
Merge pull request 7315
2019-02-16 11:31:14 -05:00
Ashwin Maroli
9adac3a11e Fix Rubocop offences in test files (#7128)
Merge pull request 7128
2018-07-12 10:21:23 -04:00
Parker Moore
7cf5f51ca2 Enforce Style/FrozenStringLiteralComment. (#6265)
Merge pull request 6265
2017-08-03 21:27:32 -04:00
Pat Hawks
1d885911bc Rubocop: Require consistent comma in multiline literals 2017-01-12 17:52:29 -06:00
Pat Hawks
69c4a8a1aa Use assert_nil instead of assert_equal nil
Fixes #5648
2016-12-10 11:31:04 -06:00
XhmikosR
dbc0349909 tests: Typo fixes. 2016-07-18 21:20:47 +03:00
Parker Moore
a7d25ed963 Fix rubocop offenses on master. 2016-06-28 22:08:06 -07:00
Parker Moore
f5a0db9dcc Rubocop: use %r for all regular expressions. 2016-06-02 17:08:21 -07:00
Pat Hawks
474fc0a9a8 Rubocop: test/test_page.rb 2016-05-25 22:00:15 -05:00
Parker Moore
b1868983c7 Add test for Page#dir in :date/nil modes 2016-01-27 08:44:59 -08:00
Zshawn Syed
4ecdf6ce10 Remove extra OR condition since a missing hash key will return a nil anyway. Added a test to catch this nil condition since it was missing to begin with. Reduced line length in test_page.rb 2016-01-21 23:44:30 -06:00
Parker Moore
275d56a0fe test: use {assert,refute}_exist everywhere 2016-01-18 13:45:36 -08:00
Parker Moore
2de5bacb41 pages' permalink' extnames must be respected
This reverts a bit of the work @willnorris had made to support
extensionless permalinks. Using the ‘permalink’ front matter will no
longer work as it must allow non-html extensions to be written.
2016-01-18 13:45:17 -08:00
Parker Moore
b6c283a4ae wip: allow custom extensions 2016-01-04 17:42:06 -08:00
Parker Moore
cd2688ab66 test_excerpt & _page: use Drop instead of Hash to mock payload 2015-12-22 22:37:48 -05:00
Jordon Bedwell
90865d5fc1 Fix #4082: Allow users to use .htm and .xhtml (XHTML5.) 2015-11-18 16:02:03 -06:00
Will Norris
0d1586a5c4 Improved permalinks for pages and collections
This updates the default permalink style for pages and collections to
match the site-wide 'permalink' setting.  If the permalink setting
contains a trailing slash, either explicitly or by being set to
':pretty', then pages and collections permalinks will contain trailing
slashes by default as well.  Similarly, if the permalink setting
contains a trailing ':output_ext', so will pages and collections.  If
the permalink setting contains neither a trailing slash or extension,
neither will pages or collections.

This impacts only the default permalink structure for pages and
collections.  Permalinks set in the frontmatter of an individual page
take precedence, as does the permalink setting for a specific
collection.

Fixes #2691
2015-03-04 09:38:23 -08:00
Will Norris
669c803912 always include file extension on destination files
This ensures that destination files for HTML posts, pages and
collections always include the proper file extension (as defined by
output_ext) regardless of permalink structure.  This allows for URLs
that contain no extension or trailing slash to still result in proper
destination files with .html extensions.

Because this change relies so heavily on output_ext accurately
identifying the extension of the destination file, this change also
removes the feature test that tested support for permalinks with a .htm
extension.  In order to support alternate file extensions, a future
patch or plugin will need to modify the output_ext value, at which point
everything else should work as expected.
2015-03-02 21:20:54 -08:00
Parker Moore
7ad0597bff Make our own Minitest::Test subclass for further subclassing 2015-02-21 00:33:47 -08:00
Parker Moore
4b59eb4175 Fix the test inheritance for the tests. 2015-02-20 13:35:02 -08:00
Parker Moore
4078bde3ba More passing tests. 2014-11-03 22:15:41 -08:00
Marcus Stollsteimer
fec6b59950 Use File.exist? instead of deprecated File.exists? 2014-04-06 13:31:34 +02:00
nitoyon
e3e1c11509 Fix Page#url escape
Post#url wasn't escaped at all.

For example, when we have a page named 'a#b.html',
we expect its url to be 'a%23b.html',
but it was actually 'a#b.html'.

We now use Jekyll::URL.escape_path and Jekyll::URL.unescape_path.
2014-03-21 16:57:41 +00:00
Parker Moore
f638fb1784 Merge master into security-vuln-patches 2014-02-06 17:21:54 -05:00
liufengyun
22e1e5f28c make sure pages with published being false are not generated 2014-01-19 09:52:19 +08:00
Ben Balter
e3be74e376 sanity check for pages permalink traversal
Signed-off-by: Parker Moore <parkrmoore@gmail.com>
2014-01-13 22:21:30 -08:00
Aidan Feldman
2bfafb3b33 make non-data properties/methods accessible to Liquid
per https://github.com/jekyll/jekyll/pull/1849/files#r8490593
2013-12-22 03:38:32 -05:00
Anand Narayan
7e79b9df92 added a plus to permalink 2013-06-15 23:18:31 +05:30
Anand Narayan
5c47014c90 removed cgi unescape in page destination 2013-06-15 18:38:14 +05:30
Sebastian Morr
151ffab6fe Removed space characters in empty lines 2013-05-16 20:27:27 +02:00
maul.esel
cc5ce06d78 remove tests for default layouts 2013-04-15 17:24:18 +02:00
Parker Moore
04fd68a232 Move Jekyll::DEFAULTS to Jekyll::Configuration::DEFAULTS 2013-04-12 21:19:20 +02:00
Parker Moore
725b127f9b Merge pull request #536 from fotos/fix_page_dir
Added path in url.
2013-03-09 17:07:16 -08:00
Fotos Georgiadis
441eddf1ca Fix pretty url style paths.
Ignore the basename if the page is an index page, preserve it if it's just an
html page and use the full path in every other case.
2013-02-28 03:49:39 +02:00
Parker Moore
5a3e05dbff Ensuring that layout is only set to the default value if layout is not specified 2013-01-12 15:31:14 -08:00
Fotos Georgiadis
4090500c5a Added path in url.
Page#dir was returning the wrong dir ('/') for pages in directories.
2012-04-09 03:08:41 +03:00
Tom Preston-Werner
6a31e650f3 Tests and specs run under 1.9. 2011-04-24 18:39:27 +08:00
Tom Preston-Werner
4afee1bda1 Merge remote branch 'jlecour/master'
Conflicts:
	lib/jekyll/page.rb
2010-11-17 15:25:55 -06:00
Jeremy Lecour
16c19ecd19 Add a failing test for rendering dotfiles
The test uses a simple ".htaccess" file that needs to be rendered
as any other page, like the sitemap.xml, …
2010-09-09 09:37:51 +02:00
Leandro Lisboa Penz
b1049c84cd Correctly generates file basename. Fixes #208.
The previous procedure generated invalid basenames when the filename had
more than one dot.
2010-09-05 18:11:09 -03:00
Jeffry Degrande
176c047ff1 bugfix for permalinks
Signed-off-by: Nick Quaranto <nick@quaran.to>
2009-07-14 19:17:44 -04:00
eugenebolshakov
49c39f43a1 the index page should always have index.html permalink no matter what 2009-05-10 15:29:05 +04:00