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

Sub categories showing 404 with vernacular slugs #594

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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
10 changes: 5 additions & 5 deletions app/server/data-loaders/tag-page-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ import { storyToCacheKey } from "@quintype/framework/server/caching";
import { TAG_PAGE_URL_PREFIX } from "../../isomorphic/constants";

export function loadTagPageData(client, tagSlug, config) {
return Story.getStories(client, "top", { "tag-slugs": tagSlug, limit: "9" }).then(stories => {
return Story.getStories(client, "top", { "tag-slugs": decodeURIComponent(tagSlug), limit: "9" }).then((stories) => {
return client.getTags(tagSlug).then(({ tags }) => {
const tagName = get(tags, [0, "name"], tagSlug);
const tagDescription = get(tags, [0, "meta-description"], tagSlug);
const tag = {
slug: tagSlug,
name: tagName,
description: tagDescription,
path: `${TAG_PAGE_URL_PREFIX}${tagSlug}`
path: `${TAG_PAGE_URL_PREFIX}${tagSlug}`,
};

return {
stories: stories.map(story => {
stories: stories.map((story) => {
return { type: "story", story: story.asJson() };
}),
title: tagName,
cacheKeys: stories.map(story => storyToCacheKey(config["publisher-id"], story)),
tag
cacheKeys: stories.map((story) => storyToCacheKey(config["publisher-id"], story)),
tag,
};
});
});
Expand Down
14 changes: 7 additions & 7 deletions config/publisher.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
asset_host: http://localhost:8080
sketches_host: https://malibu-advanced-web.qtstage.io
sketches_host: https://malibu-advanced-web.quintype.io
VeenaYemmiganur marked this conversation as resolved.
Show resolved Hide resolved
host_to_api_host:
help.lvh.me: https://user-documentation.quintype.io
host_to_automatic_api_host:
Expand Down Expand Up @@ -42,12 +42,12 @@ publisher:
should_use_collection: true
enableMetype: true
metypeConfig:
metypeHost: "https://www.metype.com/"
metypeAccountId: "1003587"
primaryColor: "#000"
backgroundColor: "#2cc7a4"
className: "story-commenting-widget"
name: "Malibu"
metypeHost: "https://www.metype.com/"
metypeAccountId: "1003587"
primaryColor: "#000"
backgroundColor: "#2cc7a4"
className: "story-commenting-widget"
name: "Malibu"
google_app_id: ""
facebook_app_id: ""
is_verification_link_flow: true
Expand Down
Loading