Skip to content

Commit 7d4a187

Browse files
george-gcaajaynarayanan
authored andcommitted
Howto remove pages (alshedivat#2933)
Closes alshedivat#2930 --------- Signed-off-by: George Araújo <[email protected]>
1 parent 3b69bef commit 7d4a187

File tree

3 files changed

+78
-4
lines changed

3 files changed

+78
-4
lines changed

CUSTOMIZE.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,80 @@ You can add a newsletter subscription form by adding the specified information a
154154

155155
Depending on your specified footer behavior, the sign up form either will appear at the bottom of the `About` page and at the bottom of blogposts if `related_posts` are enabled, or in the footer at the bottom of each page.
156156

157+
## Removing content
158+
159+
Since this template have a lot of content, you may want to delete some of it. Here is a list of the main components that you may want to delete, and how to do it. Don't forget if you delete a page, to update the `nav_order` of the remaining pages.
160+
161+
### Removing the blog page
162+
163+
To remove the blog, you have to:
164+
165+
- delete [\_posts](_posts/) directory
166+
- delete blog page [\_pages/blog.md](_pages/blog.md)
167+
- remove reference to blog page in our [\_pages/dropdown.md](_pages/dropdown.md)
168+
- remove the `Blog` section in the [\_config.yml](_config.yml) file and the related parts, like the `jekyll-archives` and `latest_posts`
169+
170+
You can also:
171+
172+
- delete [\_includes/latest_posts.liquid](_includes/latest_posts.liquid)
173+
- delete [\_includes/related_posts.liquid](_includes/related_posts.liquid)
174+
- delete [\_layouts/archive-category.liquid](_layouts/archive-category.liquid)
175+
- delete [\_layouts/archive-tag.liquid](_layouts/archive-tag.liquid)
176+
- delete [\_layouts/archive-year.liquid](_layouts/archive-year.liquid)
177+
- delete [\_plugins/external-posts.rb](_plugins/external-posts.rb)
178+
- remove the `jekyll-archives` gem from the [Gemfile](Gemfile) and the `plugins` section in [\_config.yml](_config.yml)
179+
- remove the `classifier-reborn` gem from the [Gemfile](Gemfile)
180+
181+
### Removing the news section
182+
183+
To remove the news section, you can:
184+
185+
- delete the [\_news](_news/) directory
186+
- delete the file [\_includes/news.liquid](_includes/news.liquid) and the references to it in the [\_pages/about.md](_pages/about.md)
187+
- remove the `announcements` part in [\_config.yml](_config.yml)
188+
- remove the news part in the `Collections` section in the [\_config.yml](_config.yml) file
189+
190+
### Removing the projects page
191+
192+
To remove the projects, you can:
193+
194+
- delete the [\_projects](_projects/) directory
195+
- delete the projects page [\_pages/projects.md](_pages/projects.md)
196+
- remove reference to projects page in our [\_pages/dropdown.md](_pages/dropdown.md)
197+
- remove projects part in the `Collections` section in the [\_config.yml](_config.yml) file
198+
199+
You can also:
200+
201+
- delete [\_includes/projects_horizontal.liquid](_includes/projects_horizontal.liquid)
202+
- delete [\_includes/projects.liquid](_includes/projects.liquid)
203+
204+
### Removing the publications page
205+
206+
To remove the publications, you can:
207+
208+
- delete the [\_bibliography](_bibliography/) directory
209+
- delete the publications page [\_pages/publications.md](_pages/publications.md)
210+
- remove reference to publications page in our [\_pages/dropdown.md](_pages/dropdown.md)
211+
- remove `Jekyll Scholar` section in the [\_config.yml](_config.yml) file
212+
213+
You can also:
214+
215+
- delete the [\_layouts/bib.liquid](_layouts/bib.liquid) file
216+
- delete [\_includes/bib_search.liquid](_includes/bib_search.liquid)
217+
- delete [\_includes/citation.liquid](_includes/citation.liquid)
218+
- delete [\_includes/selected_papers.liquid](_includes/selected_papers.liquid)
219+
- delete [\_plugins/google-scholar-citations.rb](_plugins/google-scholar-citations.rb)
220+
- delete [\_plugins/hide-custom-bibtex.rb](_plugins/hide-custom-bibtex.rb)
221+
- delete [\_plugins/inspirehep-citations.rb](_plugins/inspirehep-citations.rb)
222+
- remove the `jekyll-scholar` gem from the [Gemfile](Gemfile) and the `plugins` section in [\_config.yml](_config.yml)
223+
224+
### Removing the repositories page
225+
226+
To remove the repositories, you can:
227+
228+
- delete the repositories page [\_pages/repositories.md](_pages/repositories.md)
229+
- delete [\_includes/repository/](_includes/repository/) directory
230+
157231
## Adding Token for Lighthouse Badger
158232

159233
To add secrets for [lighthouse-badger](https://github.com/alshedivat/al-folio/actions/workflows/lighthouse-badger.yml), create a [personal access token (PAT)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) and add it as a [secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-encrypted-secrets-for-a-repository) named `LIGHTHOUSE_BADGER_TOKEN` to your repository. The [lighthouse-badger documentation](https://github.com/MyActionWay/lighthouse-badger-workflows#lighthouse-badger-easyyml) specifies using an environment variable, but using it as a secret is more secure and appropriate for a PAT.

_layouts/about.liquid

Lines changed: 3 additions & 3 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.enabled %}
44+
{% if page.news and site.announcements and site.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.enabled %}
52+
{% if site.latest_posts and site.latest_posts.enabled %}
5353
<h2>
5454
<a href="{{ '/blog/' | relative_url }}" style="color: inherit">latest posts</a>
5555
</h2>
@@ -73,7 +73,7 @@ layout: default
7373
</div>
7474
{% endif %}
7575

76-
{% if site.newsletter.enabled and site.footer_fixed %}
76+
{% if site.newsletter and site.newsletter.enabled and site.footer_fixed %}
7777
{% include newsletter.liquid center=true %}
7878
{% endif %}
7979
</article>

_layouts/post.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ layout: default
8484
</div>
8585
{% endif %}
8686

87-
{% if site.related_blog_posts.enabled %}
87+
{% if site.related_blog_posts and site.related_blog_posts.enabled %}
8888
{% if page.related_posts == null or page.related_posts %}
8989
{% include related_posts.liquid %}
9090
{% endif %}

0 commit comments

Comments
 (0)