diff --git a/dactyl-config.yml b/dactyl-config.yml index 7c61c3db75..2f90874f84 100644 --- a/dactyl-config.yml +++ b/dactyl-config.yml @@ -3926,9 +3926,10 @@ pages: # Code Samples page (final location TBD) - name: Code Samples html: code-samples.html - # parent: docs.html + parent: docs.html template: page-code-samples.html.jinja - sidebar: disabled + sidebar: left_only + codesamples: true filters: - code_samples top_nav_grouping: Online Tools diff --git a/template/base.html.jinja b/template/base.html.jinja index 01d21f651d..464b0a9a5e 100644 --- a/template/base.html.jinja +++ b/template/base.html.jinja @@ -109,6 +109,11 @@ {% endif %} {% include "component-tree-nav.html.jinja" %} {% endblock %} + + {% if currentpage.codesamples is defined %} + {% include "component-code-sample-filter.html.jinja" %} + {% endif %} + {% endif %} diff --git a/template/component-code-sample-filter.html.jinja b/template/component-code-sample-filter.html.jinja new file mode 100644 index 0000000000..102a0fbb63 --- /dev/null +++ b/template/component-code-sample-filter.html.jinja @@ -0,0 +1,21 @@ +
{{card.description}}
Fork the xrpl-dev-portal repo. Using git, clone the fork to your computer.
Add your sample code to the content/_code-samples folder. Be sure to include a README.md that summarizes what it does and anything else people should know about it.
Commit your changes and push them to your fork on GitHub.
Open a pull request to the original repo. Maintainers will review your submission and suggest changes if necessary. If the code sample is helpful, it’ll be merged and added to XRPL.org!
Fork the xrpl-dev-portal repo. Using git, clone the fork to your computer.
Add your sample code to the content/_code-samples folder. Be sure to include a README.md that summarizes what it does and anything else people should know about it.
Commit your changes and push them to your fork on GitHub.
Open a pull request to the original repo. Maintainers will review your submission and suggest changes if necessary. If the code sample is helpful, it’ll be merged and added to XRPL.org!