Skip to content

Commit

Permalink
change quickstart dir to guides
Browse files Browse the repository at this point in the history
  • Loading branch information
john-rock committed Oct 27, 2023
1 parent 5d217e3 commit 769905b
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 6 additions & 3 deletions website/plugins/buildQuickstartIndexPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ module.exports = function buildQuickstartIndexPage() {
name: 'docusaurus-build-quickstart-index-page-plugin',
async loadContent() {
// Quickstart files directory
const quickstartDirectory = 'docs/quickstarts'
const quickstartDirectory = 'docs/guides'

// Get all Quickstart files and content
const quickstartFiles = fs.readdirSync(quickstartDirectory)
const quickstartFiles = fs.readdirSync(quickstartDirectory, { withFileTypes: true })
.filter(dirent => dirent.isFile())
.map(dirent => dirent.name)


const quickstartData = quickstartFiles.reduce((arr, quickstartFile) => {
const fileData = fs.readFileSync(
Expand Down Expand Up @@ -53,7 +56,7 @@ module.exports = function buildQuickstartIndexPage() {

// Build the quickstart index page
addRoute({
path: `/quickstarts`,
path: `/guides`,
component: '@site/src/components/quickstartGuideList/index.js',
modules: {
// propName -> JSON file path
Expand Down

0 comments on commit 769905b

Please sign in to comment.