INNER CODE UNIT · JavaScript

authors

DataTalksClub/datatalksclub.github.io · previews/render_podcast.js:44

  const authors = config.guests.map(author => {
    const dataPath = `../_people/${author}.md`;

    const data = fs.readFileSync(dataPath, 'utf8');
    const attributes = fm(data).attributes;

    const name = attributes.title;

    const image = 'file://' + path.resolve(`../images/authors/${author}.jpg`);

    return { name, image };
  });

  console.log('authors', authors);

  await page.evaluate(({title, authors}) => {
    document.getElementById('title').textContent = title;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…