From c4a9f1729f814233b0b7596c6602d3429314a67a Mon Sep 17 00:00:00 2001 From: George <31376482+george-gca@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:50:37 -0300 Subject: [PATCH] Howto remove pages (#2933) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #2930 --------- Signed-off-by: George Araújo --- CUSTOMIZE.md | 74 +++++++++++++++++++++++++++++++++++++++++++ _layouts/about.liquid | 6 ++-- _layouts/post.liquid | 2 +- 3 files changed, 78 insertions(+), 4 deletions(-) diff --git a/CUSTOMIZE.md b/CUSTOMIZE.md index 7b67cf223658..2b0e6d64b2a1 100644 --- a/CUSTOMIZE.md +++ b/CUSTOMIZE.md @@ -154,6 +154,80 @@ You can add a newsletter subscription form by adding the specified information a 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. +## Removing content + +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. + +### Removing the blog page + +To remove the blog, you have to: + +- delete [\_posts](_posts/) directory +- delete blog page [\_pages/blog.md](_pages/blog.md) +- remove reference to blog page in our [\_pages/dropdown.md](_pages/dropdown.md) +- remove the `Blog` section in the [\_config.yml](_config.yml) file and the related parts, like the `jekyll-archives` and `latest_posts` + +You can also: + +- delete [\_includes/latest_posts.liquid](_includes/latest_posts.liquid) +- delete [\_includes/related_posts.liquid](_includes/related_posts.liquid) +- delete [\_layouts/archive-category.liquid](_layouts/archive-category.liquid) +- delete [\_layouts/archive-tag.liquid](_layouts/archive-tag.liquid) +- delete [\_layouts/archive-year.liquid](_layouts/archive-year.liquid) +- delete [\_plugins/external-posts.rb](_plugins/external-posts.rb) +- remove the `jekyll-archives` gem from the [Gemfile](Gemfile) and the `plugins` section in [\_config.yml](_config.yml) +- remove the `classifier-reborn` gem from the [Gemfile](Gemfile) + +### Removing the news section + +To remove the news section, you can: + +- delete the [\_news](_news/) directory +- delete the file [\_includes/news.liquid](_includes/news.liquid) and the references to it in the [\_pages/about.md](_pages/about.md) +- remove the `announcements` part in [\_config.yml](_config.yml) +- remove the news part in the `Collections` section in the [\_config.yml](_config.yml) file + +### Removing the projects page + +To remove the projects, you can: + +- delete the [\_projects](_projects/) directory +- delete the projects page [\_pages/projects.md](_pages/projects.md) +- remove reference to projects page in our [\_pages/dropdown.md](_pages/dropdown.md) +- remove projects part in the `Collections` section in the [\_config.yml](_config.yml) file + +You can also: + +- delete [\_includes/projects_horizontal.liquid](_includes/projects_horizontal.liquid) +- delete [\_includes/projects.liquid](_includes/projects.liquid) + +### Removing the publications page + +To remove the publications, you can: + +- delete the [\_bibliography](_bibliography/) directory +- delete the publications page [\_pages/publications.md](_pages/publications.md) +- remove reference to publications page in our [\_pages/dropdown.md](_pages/dropdown.md) +- remove `Jekyll Scholar` section in the [\_config.yml](_config.yml) file + +You can also: + +- delete the [\_layouts/bib.liquid](_layouts/bib.liquid) file +- delete [\_includes/bib_search.liquid](_includes/bib_search.liquid) +- delete [\_includes/citation.liquid](_includes/citation.liquid) +- delete [\_includes/selected_papers.liquid](_includes/selected_papers.liquid) +- delete [\_plugins/google-scholar-citations.rb](_plugins/google-scholar-citations.rb) +- delete [\_plugins/hide-custom-bibtex.rb](_plugins/hide-custom-bibtex.rb) +- delete [\_plugins/inspirehep-citations.rb](_plugins/inspirehep-citations.rb) +- remove the `jekyll-scholar` gem from the [Gemfile](Gemfile) and the `plugins` section in [\_config.yml](_config.yml) + +### Removing the repositories page + +To remove the repositories, you can: + +- delete the repositories page [\_pages/repositories.md](_pages/repositories.md) +- delete [\_includes/repository/](_includes/repository/) directory + ## Adding Token for Lighthouse Badger 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. diff --git a/_layouts/about.liquid b/_layouts/about.liquid index 0cfa9ad9e41a..fe8cf3a916bc 100644 --- a/_layouts/about.liquid +++ b/_layouts/about.liquid @@ -41,7 +41,7 @@ layout: default
{{ content }}
- {% if page.news and site.announcements.enabled %} + {% if page.news and site.announcements and site.announcements.enabled %}

news

@@ -49,7 +49,7 @@ layout: default {% endif %} - {% if site.latest_posts.enabled %} + {% if site.latest_posts and site.latest_posts.enabled %}

latest posts

@@ -73,7 +73,7 @@ layout: default {% endif %} - {% if site.newsletter.enabled and site.footer_fixed %} + {% if site.newsletter and site.newsletter.enabled and site.footer_fixed %} {% include newsletter.liquid center=true %} {% endif %} diff --git a/_layouts/post.liquid b/_layouts/post.liquid index 5e00c922e2d0..35c84bc0f1b4 100644 --- a/_layouts/post.liquid +++ b/_layouts/post.liquid @@ -84,7 +84,7 @@ layout: default {% endif %} - {% if site.related_blog_posts.enabled %} + {% if site.related_blog_posts and site.related_blog_posts.enabled %} {% if page.related_posts == null or page.related_posts %} {% include related_posts.liquid %} {% endif %}