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 image to tag #256

Merged
merged 5 commits into from
Jun 28, 2023
Merged
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"scripts": {
"start": "npx netlify-cms-proxy-server & npm run watch",
"clean": "rm -rf _site",
"setup": "cp env-example .env",
"local-setup": "cp env-example .env",
"watch": "npx @11ty/eleventy --serve --quiet & npm run tw:watch",
"build": "npm run tw:build && npm run 11ty:build",
"11ty:build": "ELEVENTY_ENV=prod eleventy",
Expand Down
4 changes: 2 additions & 2 deletions src/_system/_decapcms/contenttypes/menuitem.liquid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -----------------------------------------------------------------
# ---------------------------------------------------------------
# Menu Items
# -----------------------------------------------------------------
# ---------------------------------------------------------------
- name: menuitem
label: 🍔 Menu Items
label_singular: 🍔 Menu Item
Expand Down
16 changes: 14 additions & 2 deletions src/_system/_decapcms/contenttypes/tag.liquid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -----------------------------------------------------------------
# ---------------------------------------------------------------
# Relations Tags
# -----------------------------------------------------------------
# ---------------------------------------------------------------
- name: tags
label_singular: 🏷 Tag
label: 🏷 Tags
Expand All @@ -22,6 +22,16 @@
hint: ""
%}

{% include "_system/_decapcms/widgets/image",
name: "image",
label: "Image",
default: "/content/upload/default.png"
choose_url: true,
allow_multiple: false,
required: "false",
hint: ""
%}

{% include "_system/_decapcms/widgets/markdown",
name: "body",
label: "Body",
Expand All @@ -30,6 +40,8 @@
hint: "help text"
%}

{% include "_system/_decapcms/fields/card.liquid" %}

{% include "_system/_decapcms/fields/opengraph.liquid" %}

{% include "_system/_decapcms/fields/seo.liquid" %}
Expand Down
4 changes: 2 additions & 2 deletions src/content/tag/saga11.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ title: Saga 11
icon: icons/arrow-down-left.svg
eleventyExcludeFromCollections: false
rssfeed: true
image: /content/upload/saga11icon.svg
eleventyNavigation:
title: ""
parent: ""
order: 20
layout: tag/tag.liquid
---

This is a Tag page
The tag page for "Saga11"
32 changes: 17 additions & 15 deletions src/theme-grunn/layouts/tag/tag.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ tags:
That then refers to the file tag/saga11.md that constainss all the data the we use on this page.
{% endcomment %}

{% comment %}
this dosnt rewally work..
{% endcomment %}


<article class="flex flex-row space-x-8">
<div class="basis-2/12">
Expand All @@ -24,25 +20,31 @@ this dosnt rewally work..
<div class="basis-10/12">
<h1 class="text-6xl text-primary-700">{{ title }}</h1>

<div class="prose prose-xl">
<div class="prose prose-xl py-4">
{{ content }}
</div>

<div class="md:grid grid-cols-3 gap-4 py-4">
{% for item in collections[page.fileSlug] %}
{% render 'card',
title: item.data.card.title,
text: item.data.card.text,
image: item.data.card.image,
url: item.url,
date: item.date

{% assign title = item.data.card.title | default: item.data.title %}
{% assign image = item.data.card.image | default: item.data.image %}
{% assign text = item.data.card.text | default: item.data.text | truncatewords: "20", " ..." %}
{%
render 'card.liquid',
title: title,
text: text,
image: image,
url: item.url,
date: item.date
%}

{% endfor %}
</div>

</article>

<a href="/feed/{{ title | slugify }}.xml" class="flex flex-row items-center justify-center">
<div class="w-4 h-4 mr-2">{% include "svg/rss.svg" %}</div>
<div>{{ title }} feed </div>
</a>
<a href="/feed/{{ title | slugify }}.xml" class="flex flex-row items-center justify-center">
<div class="w-4 h-4 mr-2">{% include "svg/rss.svg" %}</div>
<div>{{ title }} feed </div>
</a>