-
-
Notifications
You must be signed in to change notification settings - Fork 778
How to Link to a Project's Detailed Info Page
Jessica Cheng edited this page Jan 19, 2023
·
20 revisions
The following instructions are for the project files in _projects
and use Liquid template language and Jekyll. We will be using code snippets from this example.
- Create a variable with a relative pathname using
slug
and prepending "../projects/".Slug
uses the filename of a document andany character except numbers and letters is replaced as [a] hyphen
in the filename [https://jekyllrb.com/docs/permalinks/#placeholders].
Example:
Create a variable {% assign project_relative_path = project.slug | prepend: "../projects/" %}
- Created a new variable
project_relative_path
which was set as the filename of the project using Jekyll's .slug attribute, using a filter to prepend it by "../projects/". - Replaced the existing
<a>
element's href property of the<li class='project-card-mini'>
element with the new variable.
Click the arrow below each category to view links (or view original alphabetical list by clicking "Pages" above) :