Skip to content

Conversation

@rdw-software
Copy link
Member

@rdw-software rdw-software commented Feb 20, 2025

Inline MDX on its own would be fine, but without control over the CSS there's no way to render the description at full width. (This is surely going to fail in some edge cases, but I'd rather not mess with it any more than necessary right now.)


Spacing messed up because the description isn't inside the block yet:

image

Description outside the Function block (existing approach), with empty Description block:

image

Moving the description inside the Function block (new and preferred approach):

image

Requires the following code changes, which have yet to be applied to all functions:

### path.dirname

Returns the directory path of the given `fileSystemPath` (ignoring trailing separators), similar to the Unix [dirname](https://en.wikipedia.org/wiki/Dirname) command.

<Function since="v0.0.1">
<Parameters>
### path.dirname

<Function since="v0.0.1">
<Description>

Returns the directory path of the given `fileSystemPath` (ignoring trailing separators), similar to the Unix [dirname](https://en.wikipedia.org/wiki/Dirname) command.

</Description>
<Parameters>

Note: Spaces are needed according to the Docusaurus site (MDX parser issue). Otherwise children may be empty?

Inline MDX on its own would be fine, but without control over the CSS there's no way to render the description at full width.
This is surely going to fail in some edge cases, but I'd rather not mess with it any more than necessary right now.
@rdw-software rdw-software force-pushed the description-inside-jsx branch from a86b731 to 946d516 Compare February 20, 2025 18:37
@rdw-software rdw-software merged commit b39e226 into main Feb 20, 2025
2 checks passed
@rdw-software rdw-software deleted the description-inside-jsx branch February 20, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants