Skip to content

Commit cb3dd28

Browse files
george-gcaajaynarayanan
authored andcommitted
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 c55efdd commit cb3dd28

File tree

6 files changed

+22
-16
lines changed

6 files changed

+22
-16
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

_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
@@ -10,9 +10,18 @@ profile:
1010
image_circular: false # crops the image to make it circular
1111
more_info: >
1212
13-
news: true # includes a list of news items
1413
selected_papers: true # includes a list of papers marked as "selected={true}"
1514
social: true # includes social icons at the bottom of the page
15+
16+
announcements:
17+
enabled: true # includes a list of news items
18+
scrollable: true # adds a vertical scroll bar if there are more than 3 news items
19+
limit: 5 # leave blank to include all the news in the `_news` folder
20+
21+
latest_posts:
22+
enabled: true
23+
scrollable: true # adds a vertical scroll bar if there are more than 3 new posts items
24+
limit: 3 # leave blank to include all the blog posts
1625
---
1726

1827
I'm a second-year graduate student at [Pennsylvania State University](https://www.psu.edu/), pursuing a PhD in Computer Science and Engineering.

0 commit comments

Comments
 (0)