Skip to content

Commit

Permalink
Updating index and blog import
Browse files Browse the repository at this point in the history
  • Loading branch information
fe-lix- committed Dec 6, 2023
1 parent 4d18bd2 commit ae96947
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
9 changes: 0 additions & 9 deletions helix-query.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ indices:
select: head > meta[name="author"]
value: attribute(el, "content")
tags:
select: head > meta[property="article:tag"]
values: |
match(attribute(el, 'content'), '([^,]+)')
tags-raw:
select: head > meta[property="article:tag"]
values: attribute(el, 'content')
blog_ca:
Expand Down Expand Up @@ -59,10 +55,5 @@ indices:
select: head > meta[name="author"]
value: attribute(el, "content")
tags:
select: head > meta[property="article:tag"]
values: |
match(attribute(el, 'content'), '([^,]+)')
tags-raw:
select: head > meta[property="article:tag"]
values: attribute(el, 'content')

3 changes: 2 additions & 1 deletion tools/importer/transformers/hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

const createHero = (main, document) => {
const hero = main.querySelector('div#mainContent > div > div:first-child');
if (hero) {
const title = hero.querySelector('h1');
if (hero && title) {
const titleNodes = hero.querySelector('h1').childNodes;

const h1 = document.createElement('h1');
Expand Down
6 changes: 6 additions & 0 deletions tools/importer/transformers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@ import createHeader from './header.js';
import createHero from './hero.js';
import createMetadata from './metadata.js';
import cleanUpHTML from './cleanUpHTML.js';
import createBlogArticle from './blogArticle.js';
import createBlogBanner from './blogBanner.js';
import cleanBlog from './cleanBlog.js';

export const transformers = [
createFullLayoutSection,
createHero,
createHomepage,
createCards,
createFeatureImage,
createBlogArticle,
createBlogBanner,
];

export const xfTransformers = [
Expand All @@ -31,4 +36,5 @@ export const preTransformers = [
export const postTransformers = [
createMetadata,
cleanUpHTML,
cleanBlog,
];

0 comments on commit ae96947

Please sign in to comment.