Skip to content

Commit b885d96

Browse files
committed
Add marketplace dir + python script
1 parent 716f987 commit b885d96

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

convert_html_to_markdown.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from bs4 import BeautifulSoup
2+
import requests
3+
import markdownify
4+
5+
def html_to_markdown(url, output_file):
6+
response = requests.get(url)
7+
html_content = response.text
8+
9+
# Parse the HTML content using Beautiful Soup
10+
soup = BeautifulSoup(html_content, 'html.parser')
11+
12+
# Convert HTML to Markdown
13+
markdown_text = markdownify.markdownify(str(soup), heading_style="ATX")
14+
15+
# Save to a Markdown file
16+
with open(output_file, 'w') as file:
17+
file.write(markdown_text)
18+
19+
# URL of the page you want to convert
20+
url = 'https://docs.flutterflow.io/marketplace/adding-and-purchasing-items'
21+
22+
# Output filename
23+
output_file = 'output.md'
24+
25+
# Perform conversion and save to file
26+
html_to_markdown(url, output_file)

docusaurus.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ const config: Config = {
6969
},
7070
items: [
7171

72+
{
73+
type: 'doc',
74+
docId: 'marketplace/index',
75+
position: 'left',
76+
label: 'Marketplace',
77+
},
7278
{
7379
href: 'https://github.com/FlutterFlow/flutterflow-documentation',
7480
label: 'GitHub',
@@ -87,7 +93,9 @@ const config: Config = {
8793
to: '#',
8894
},
8995
],
96+
9097
},
98+
9199
{
92100
title: 'Community',
93101
items: [

sidebars.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
22

33

44
const sidebars: SidebarsConfig = {
5+
marketplaceSidebar: [{type: 'autogenerated', dirName: 'marketplace'}], // Adjust `dirName` as needed
56
troubleshootingSidebar: [{type: 'autogenerated', dirName: 'troubleshooting'}], // Adjust `dirName` as needed
67
changelogSidebar: [{type: 'autogenerated', dirName: 'changelog'}], // Adjust `dirName` as needed
78
docsSidebar: [

0 commit comments

Comments
 (0)