agency-jekyll-theme icon indicating copy to clipboard operation
agency-jekyll-theme copied to clipboard

Recommend just using forloop.index instead of requiring a modal-id property to be set for every post.

Open georgeslabreche opened this issue 8 years ago • 2 comments

Using {{forloop.index}} instead of {{post.modal-id}} here: https://github.com/y7kim/agency-jekyll-theme/blob/0a9be6a3ffea3d464b6f87c8197365c45acf830e/_includes/portfolio_grid.html#L13

and here: https://github.com/y7kim/agency-jekyll-theme/blob/0a9be6a3ffea3d464b6f87c8197365c45acf830e/_includes/modals.html#L3

Will eliminate the need for set and track modal-id properties in every post that is created.

georgeslabreche avatar Apr 04 '18 01:04 georgeslabreche

Alternatively could just use {{ post.title | slugify }} instead of portfolioModal{{ post.modal-id }}, this would result in a SEO friendlier URL to share direct link to modal.

georgeslabreche avatar Apr 04 '18 01:04 georgeslabreche

Good idea, you're welcome to create a PR

On Tue, Apr 3, 2018, 6:05 PM Georges Labrèche [email protected] wrote:

Using {{forloop.index}} instead of {{post.modal-id}} here:

https://github.com/y7kim/agency-jekyll-theme/blob/0a9be6a3ffea3d464b6f87c8197365c45acf830e/_includes/portfolio_grid.html#L13

and here:

https://github.com/y7kim/agency-jekyll-theme/blob/0a9be6a3ffea3d464b6f87c8197365c45acf830e/_includes/modals.html#L3

Will eliminate the need for set and track modal-id properties in every post that is created.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/y7kim/agency-jekyll-theme/issues/71, or mute the thread https://github.com/notifications/unsubscribe-auth/ADtkiIjJNmsthxhG6nYjOWnKYGQwHJNuks5tlBxUgaJpZM4TGAzS .

y7kim avatar Apr 04 '18 01:04 y7kim