Hexo variable

I feel that the usage of variables on the hexo official website is not very detailed. For example, I cycle page.posts to get each article, and the configuration information for each article is as follows:

---
title: vue title
category: vue
tags:
  - vue-router
  - aafs
---

then I wrote this in index.ejs:

<ul>
  <% page.posts.forEach(function(post){%>
      <li>
        <div>
          :<%- post.title %>
          :<%- post.category %>
          :
          <% post.tags.forEach(function(tag){ %>
            

<%= tag %>

<% }) %> </div> </li> <% }) %> </ul>

I can"t get category and tags from the above code

May.11,2022

<% 
  page.posts.forEach(function(post){
    post.tags.data.forEach((tag)=>{
      console.log(tag.name)
    })
    post.categories.data.forEach((category)=>{
      console.log(category.name)
    })
  })
%>
Menu