File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 17
17
< body >
18
18
< div id ="root "> </ div >
19
19
< script type ="module " src ="/src/main.jsx "> </ script >
20
- < script src ="../path/to/flowbite/dist/flowbite.min.js "> </ script >
21
20
</ body >
22
21
</ html >
Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ const DocDetail = () => {
19
19
try {
20
20
const response = await fetch ( `/posts/${ slug } .md` ) ;
21
21
if ( ! response . ok ) {
22
- throw new Error ( 'Network response was not ok' ) ;
22
+ throw new Error ( `Failed to fetch content: ${ response . statusText } ` ) ;
23
23
}
24
- const text = await response . text ( ) ;
24
+ const text = await response . text ( ) ; // Ensure you're reading text
25
25
setContent ( text ) ;
26
26
} catch ( error ) {
27
27
setError ( error . message ) ;
@@ -33,6 +33,7 @@ const DocDetail = () => {
33
33
fetchContent ( ) ;
34
34
} , [ slug ] ) ;
35
35
36
+
36
37
const extractHeadings = ( markdown ) => {
37
38
const headings = [ ] ;
38
39
const regex = / ^ # { 1 , 6 } \s + ( .* ) $ / gm;
You can’t perform that action at this time.
0 commit comments