jekyll-scholar 6.3.2 → 6.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/details.feature +56 -0
- data/lib/jekyll/scholar/utilities.rb +5 -4
- data/lib/jekyll/scholar/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a730e051294ecd12de18ee1c73878fa0688721a32951ca8d946340a1d576e8c0
|
4
|
+
data.tar.gz: 4abfbd1a91e5a42910c4df9c7d52e6ad6ffc0683a64102cd0fe2710324e85181
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6141ae4a92377c83f0d6903187354ca1f7719c3dc4361036c68b0d4543d38ac620ec7c1759ccb5a7aca8196e7fcd15f4018f608394a8614b6659df7480f453d0
|
7
|
+
data.tar.gz: 65748fe1ebf6cae81e167aa2137c52a2a88fbb35fe2829732d02f16c8dc5f1ca9f677e5bad1aaf1469ae2690919035a3fee8e9ba5407a5a19e562a534b7169ee
|
data/features/details.feature
CHANGED
@@ -385,6 +385,62 @@ Feature: Details
|
|
385
385
|
And the "_site/bibliography/2008/10.0000/1111/index.html" file should exist
|
386
386
|
And the "_site/bibliography/2018/ruby/index.html" file should exist
|
387
387
|
|
388
|
+
@tags @details
|
389
|
+
Scenario: Detail page URLs can have custom permalinks and custom base URL (issue #284)
|
390
|
+
Given I have a configuration file with:
|
391
|
+
| key | value |
|
392
|
+
| baseurl | /blog/ |
|
393
|
+
| permalink | /:title/ |
|
394
|
+
And I have a scholar configuration with:
|
395
|
+
| key | value |
|
396
|
+
| source | ./_bibliography |
|
397
|
+
| bibliography | references |
|
398
|
+
| details_layout | details.html |
|
399
|
+
| details_permalink | /:details_dir/:year/:doi:extension |
|
400
|
+
And I have a "_bibliography" directory
|
401
|
+
And I have a file "_bibliography/references.bib":
|
402
|
+
"""
|
403
|
+
@book{rubydoi,
|
404
|
+
title = {The Ruby Programming Language},
|
405
|
+
author = {Flanagan, David and Matsumoto, Yukihiro},
|
406
|
+
year = {2008},
|
407
|
+
publisher = {O'Reilly Media},
|
408
|
+
doi = {10.0000/1111}
|
409
|
+
}
|
410
|
+
|
411
|
+
@book{ruby,
|
412
|
+
title = {The Ruby Programming Language},
|
413
|
+
author = {Flanagan, David and Matsumoto, Yukihiro},
|
414
|
+
year = {2018},
|
415
|
+
publisher = {O'Reilly Media}
|
416
|
+
}
|
417
|
+
"""
|
418
|
+
And I have a "_layouts" directory
|
419
|
+
And I have a file "_layouts/details.html":
|
420
|
+
"""
|
421
|
+
---
|
422
|
+
---
|
423
|
+
<html>
|
424
|
+
<head></head>
|
425
|
+
<body>
|
426
|
+
{{ page.entry.title }}
|
427
|
+
</body>
|
428
|
+
</html>
|
429
|
+
"""
|
430
|
+
And I have a page "scholar.html":
|
431
|
+
"""
|
432
|
+
---
|
433
|
+
---
|
434
|
+
{% bibliography %}
|
435
|
+
"""
|
436
|
+
When I run jekyll
|
437
|
+
Then the _site directory should exist
|
438
|
+
And the "_site/scholar/index.html" file should exist
|
439
|
+
And I should see "<a[^>]+href=\"/blog/bibliography/2008/10.0000/1111/\">" in "_site/scholar/index.html"
|
440
|
+
And I should see "<a[^>]+href=\"/blog/bibliography/2018/ruby/\">" in "_site/scholar/index.html"
|
441
|
+
And the "_site/blog/bibliography/2008/10.0000/1111/index.html" file should exist
|
442
|
+
And the "_site/blog/bibliography/2018/ruby/index.html" file should exist
|
443
|
+
|
388
444
|
@generators @parse_months
|
389
445
|
Scenario: Months are parsed by default
|
390
446
|
Given I have a scholar configuration with:
|
@@ -641,10 +641,11 @@ module Jekyll
|
|
641
641
|
end
|
642
642
|
|
643
643
|
# generate the URL
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
644
|
+
File.join(base,
|
645
|
+
URL.new(
|
646
|
+
:template => config['details_permalink'],
|
647
|
+
:placeholders => url_placeholders
|
648
|
+
).to_s)
|
648
649
|
end
|
649
650
|
|
650
651
|
def base_url
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-scholar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.3.
|
4
|
+
version: 6.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvester Keil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|