The source project of this merge request has been removed.
Support rendering tables of wiki front-matter
What does this MR do?
Adds <FrontMatterTable />
wiki tag. See #228538 (closed).
Examples of supported syntax:
<!-- Render a table of all front-matter of pages in the current wiki directory: -->
<FrontMatterTable />
<!-- Specify an absolute wiki directory: -->
<FrontMatterTable path="/Some-Folder" />
<!-- Specify a relative wiki directory: -->
<FrontMatterTable path=".." />
<!-- Restrict the table to only showing some front-matter columns: -->
<FrontMatterTable columns="some_key,some_other_key" />
<!-- Also show the full content of each wiki page: -->
<FrontMatterTable content />
<!-- Truncate the content of each wiki page to 80 characters: -->
<FrontMatterTable content-truncated=80 />
Screenshots
Create some wiki pages with front-matter like this:
Then create an index page with a tag like this:
And the index page will render a table like this:
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
- To test, first create the wiki pages with front-matter
- (For now, you need to create the wiki pages with front-matter before enabling the
:wiki_front_matter
feature flag, due to #234899.)
- (For now, you need to create the wiki pages with front-matter before enabling the
- Then enable the feature flags:
bundle exec rails console
Feature.enable(:wiki_front_matter)
Feature.enable(:front_matter_table)
-
Then create the index wiki page using the new tag
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Closes #228538 (closed)
/cc @alexkalderimis, since you worked on !27706 (merged)
Edited by Steve Mokris