Is it possible to move some posts to archive and not show in main list?

Hi,

I have a blog at GitHub - njmulsqb/njmulsqb.github.io: My Github Page It contains a list of all posts and a archive page, is there any way that I can hide some posts from the main listing, but at the same time I want them to be visible in archive?
The goal is to remove some of the posts from the primary posts page but not to remove them completely, it will stay in archive so that nobody ends up to 404 pages when hitting those old post links.

You can pass a limit keyword to the iterator in your index page. For example, say your site has 25 posts. If you want to list just the recent 10 posts, the iterator would be:

{% for post in site.posts limit: 10 %}
  - [{{ post.title }}]({{ post.url }})
{% endfor %}

Then if you have another index at /achives/, use the keyword offset instead:

{% for post in site.posts offset: 10 %}
  - [{{ post.title }}]({{ post.url }})
{% endfor %}

Ok, thats useful when you want to hide posts in a sequence, what if I want to hide some selective posts that are not in a sequence?

Then you’ll have to use conditionals along with an efficient criterion / criteria. For example:

{% for post in site.posts %}
  {% if <criterion_satisfied> %}
  - [{{ post.title }}]({{ post.url }})
  {% endif %}
{% endfor %}

Or filter out relevant posts before the iteration like demonstrated here:

Is it possible to filter based on tags? What if I assign “old” tag to some posts and then in if condition filter those out? Can you tell me how the if condition will look like in that case?

did you check the link above ash posted? by bill? it has an example of how to use a filter and that would work with any front matter variable - including tags I think though that might get a little complicated.

Try to do what is in the link above if it doesn’t work post the code you used for your use case as well as what a posts front matter looks like.