browser-automation / cba-website

Chromium browser automation browser extension website

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Import CBA website content

Manvel opened this issue · comments

Background

Page contents currently is available in the CSV format exported from the database of the Drupal website. The pages on the, pages consisted of Title and the actual content.

What to change

Add pages to the website using the exported content.

In order to support hierarchical structure of the navigations in the website, we can introduce the nested hierarchy in the pages folder to easier find the relevant content in the pages directory ex.:

|- documentation
|  |- interface
|     |- index.html
|     |- project.html
|     |- actions-grid.html
...  

Also we can provide hierarchy reference in the pages in order to construct navigation menus, ex.:

actions-grid.html
---
title: Actions datagrid
parentBranch: interface
---

...
documentation/interface/index.html
---
title: Interface
branch: interface
---
...

This way we will be able to use queryPages to construct the navigations and breadcrumbs in theme folder, ex.:

<% 
  const docPages = site.queryPages((data) => data.branch || data.parentBranch); 
  for (const {branch, parentBranch} of docPages)
  ...
%>