Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new feature to allow user to display individual repositories in their Projects pages #2689

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CUSTOMIZE.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,27 @@ If you want to create blog posts that are not ready to be published, but you wan

You can create new projects by adding new Markdown files in the [\_projects](_projects/) directory. The easiest way to do this is to copy an existing project and modify it.

You can also display your project's GitHub Repo Card, if it has any, on the project page.

You simply need to add the following to your Markdown file's Frontmatter :

```YAML
repositories:
- Owner1UserName/Repo1
- Owner2UserName/Repo2
```

This way you can add as many repos as needed to the header of the page.

If you want to include a repo in a location other than you header, then you need to add the following code to that location :

```LIQUID
<div class="repositories d-flex flex-wrap flex-md-row flex-column justify-content-between align-items-center">
{% include repository/repo.liquid repository=Username1/Repo1 %}
{% include repository/repo.liquid repository=Username2/Repo2 %}
</div>
```

## Adding some news

You can add news in the about page by adding new Markdown files in the [\_news](_news/) directory. There are currently two types of news: inline news and news with a link. News with a link take you to a new page while inline news are displayed directly in the about page. The easiest way to create yours is to copy an existing news and modify it.
Expand Down
7 changes: 7 additions & 0 deletions _layouts/page.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ layout: default
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
<p class="post-description">{{ page.description }}</p>
{% if page.repositories %}
<div class="repositories d-flex flex-wrap flex-md-row flex-column justify-content-between align-items-center">
{% for repo in page.repositories %}
{% include repository/repo.liquid repository=repo %}
{% endfor %}
</div>
{% endif %}
</header>

<article>
Expand Down