Skip to content

Commit 85ed196

Browse files
author
Phillip Webb
committed
Remove 'not found in _includes' hacks
Remove the use if "unless contains 'not found in _includes directory'" hacks that were previously used to detect when _includes were missing. This change is required as the hack no longer works with the latest Jekyll release (and therefore also with GitHub). Additional 'custom_pom_template' and 'custom_gradle_template' flags must now be set in _config.yml if you want to include a custom pom.xml or build.gradle file.
1 parent 171918e commit 85ed196

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

_config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ github_repo_url: http://github.com/spring-projects/spring-framework
2525
# Project forum URL
2626
forum: http://forum.spring.io/forum/spring-projects/container
2727

28+
# If you want to include a custom pom.xml or gradle template set these value to true and add _include files
29+
custom_pom_template: false
30+
custom_gradle_template: false
31+
2832

2933
### The following properties are constant for most projects
3034

_includes/project_sidebar.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
{% include documentation.html %}
2-
{%unless badges contains 'not found in _includes directory' %}
32
<div class="right-pane-widget--container no-top-border">
43
<div class="project-sub-link--wrapper">
54
{% include badges.html %}
65
</div>
76
</div>
8-
{%endunless%}
97
<div class="right-pane-widget--container no-top-border project-sidebar-resource--wrapper">
108
{{ related_resources | markdownify }}
119
</div>

_includes/widget_templates.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@
6262
</script>
6363

6464

65+
{% if site.custom_pom_template %}
6566
{% capture maven_pom_template %}
6667
{% include pom.xml %}
6768
{% endcapture %}
68-
69-
{%if maven_pom_template contains 'not found in _includes directory' %}
69+
{% else %}
7070
{% capture maven_pom_template %}
7171
<dependencies>
7272
<dependency>
@@ -99,11 +99,11 @@
9999
{% endhighlight %}
100100
</script>
101101

102+
{% if site.custom_gradle_template %}
102103
{% capture gradle_template %}
103104
{% include build.gradle %}
104105
{% endcapture %}
105-
106-
{%if gradle_template contains 'not found in _includes directory' %}
106+
{% else %}
107107
{% capture gradle_template %}
108108
dependencies {
109109
compile '{@= groupId @}:{@= artifactId @}:{@= version @}'

0 commit comments

Comments
 (0)