Skip to content

Commit e5c42d7

Browse files
authored
Moved specific information from config to about (alshedivat#2985)
Moved news and latest posts related information from `_config.yml` to `_about.md` page. Signed-off-by: George Araújo <[email protected]>
1 parent 0465993 commit e5c42d7

File tree

7 files changed

+22
-26
lines changed

7 files changed

+22
-26
lines changed

CUSTOMIZE.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ To remove the blog, you have to:
176176
- delete [\_posts](_posts/) directory
177177
- delete blog page [\_pages/blog.md](_pages/blog.md)
178178
- remove reference to blog page in our [\_pages/dropdown.md](_pages/dropdown.md)
179-
- remove the `Blog` section in the [\_config.yml](_config.yml) file and the related parts, like the `jekyll-archives` and `latest_posts`
179+
- remove the `latest_posts` part in [\_pages/about.md](_pages/about.md)
180+
- remove the `Blog` section in the [\_config.yml](_config.yml) file and the related parts, like the `jekyll-archives`
180181

181182
You can also:
182183

@@ -195,7 +196,7 @@ To remove the news section, you can:
195196

196197
- delete the [\_news](_news/) directory
197198
- delete the file [\_includes/news.liquid](_includes/news.liquid) and the references to it in the [\_pages/about.md](_pages/about.md)
198-
- remove the `announcements` part in [\_config.yml](_config.yml)
199+
- remove the `announcements` part in [\_pages/about.md](_pages/about.md)
199200
- remove the news part in the `Collections` section in the [\_config.yml](_config.yml) file
200201

201202
### Removing the projects page

_config.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -153,16 +153,6 @@ collections:
153153
output: true
154154
permalink: /:collection/:title/
155155

156-
announcements:
157-
enabled: true
158-
scrollable: true # adds a vertical scroll bar if there are more than 3 news items
159-
limit: 5 # leave blank to include all the news in the `_news` folder
160-
161-
latest_posts:
162-
enabled: true
163-
scrollable: true # adds a vertical scroll bar if there are more than 3 new posts items
164-
limit: 3 # leave blank to include all the blog posts
165-
166156
# -----------------------------------------------------------------------------
167157
# Jekyll settings
168158
# -----------------------------------------------------------------------------

_includes/distill_scripts.liquid

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,3 @@
278278
<script src="{{ '/assets/js/search-data.js' | relative_url }}"></script>
279279
<script src="{{ '/assets/js/shortcut-key.js' | relative_url | bust_file_cache }}"></script>
280280
{% endif %}
281-
282-
{% if site.newsletter.enabled %}
283-
<script defer src="{{ '/assets/js/newsletter.js' | relative_url | bust_file_cache }}"></script>
284-
{% endif %}

_includes/latest_posts.liquid

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<div class="news">
2-
{% if site.latest_posts != blank %}
2+
{% if page.latest_posts != blank %}
33
{% assign latest_posts_size = site.posts | size %}
44
<div
55
class="table-responsive"
6-
{% if site.latest_posts.scrollable and latest_posts_size > 3 %}
6+
{% if page.latest_posts.scrollable and latest_posts_size > 3 %}
77
style="max-height: 60vw"
88
{% endif %}
99
>
1010
<table class="table table-sm table-borderless">
1111
{% assign latest_posts = site.posts %}
12-
{% if site.latest_posts.limit %}
13-
{% assign latest_posts_limit = site.latest_posts.limit %}
12+
{% if page.latest_posts.limit %}
13+
{% assign latest_posts_limit = page.latest_posts.limit %}
1414
{% else %}
1515
{% assign latest_posts_limit = latest_posts_size %}
1616
{% endif %}

_includes/news.liquid

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
{% assign news_size = site.news | size %}
44
<div
55
class="table-responsive"
6-
{% if include.limit and site.announcements.scrollable and news_size > 3 %}
6+
{% if include.limit and page.announcements.scrollable and news_size > 3 %}
77
style="max-height: 60vw"
88
{% endif %}
99
>
1010
<table class="table table-sm table-borderless">
1111
{% assign news = site.news | reverse %}
12-
{% if include.limit and site.announcements.limit %}
13-
{% assign news_limit = site.announcements.limit %}
12+
{% if include.limit and page.announcements.limit %}
13+
{% assign news_limit = page.announcements.limit %}
1414
{% else %}
1515
{% assign news_limit = news_size %}
1616
{% endif %}

_layouts/about.liquid

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ layout: default
4141
<div class="clearfix">{{ content }}</div>
4242

4343
<!-- News -->
44-
{% if page.news and site.announcements and site.announcements.enabled %}
44+
{% if page.announcements and page.announcements.enabled %}
4545
<h2>
4646
<a href="{{ '/news/' | relative_url }}" style="color: inherit">news</a>
4747
</h2>
4848
{% include news.liquid limit=true %}
4949
{% endif %}
5050

5151
<!-- Latest posts -->
52-
{% if site.latest_posts and site.latest_posts.enabled %}
52+
{% if page.latest_posts and page.latest_posts.enabled %}
5353
<h2>
5454
<a href="{{ '/blog/' | relative_url }}" style="color: inherit">latest posts</a>
5555
</h2>

_pages/about.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,18 @@ profile:
1313
<p>123 your address street</p>
1414
<p>Your City, State 12345</p>
1515
16-
news: true # includes a list of news items
1716
selected_papers: true # includes a list of papers marked as "selected={true}"
1817
social: true # includes social icons at the bottom of the page
18+
19+
announcements:
20+
enabled: true # includes a list of news items
21+
scrollable: true # adds a vertical scroll bar if there are more than 3 news items
22+
limit: 5 # leave blank to include all the news in the `_news` folder
23+
24+
latest_posts:
25+
enabled: true
26+
scrollable: true # adds a vertical scroll bar if there are more than 3 new posts items
27+
limit: 3 # leave blank to include all the blog posts
1928
---
2029

2130
Write your biography here. Tell the world about yourself. Link to your favorite [subreddit](http://reddit.com). You can put a picture in, too. The code is already in, just name your picture `prof_pic.jpg` and put it in the `img/` folder.

0 commit comments

Comments
 (0)