From a0a1224d88706b6524abebf2a1ddde2dea362245 Mon Sep 17 00:00:00 2001 From: Will Boyd Date: Sat, 24 Feb 2024 14:16:28 -0500 Subject: [PATCH] Rename debug.js to example.js --- CONTRIBUTING.md | 2 +- src/frontmatter/{debug.js => example.js} | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/frontmatter/{debug.js => example.js} (79%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1d14dc2..1f0c0ec 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,6 +18,6 @@ Keeping the wizard as short as possible is a priority. Pull requests that add op Similarly, default frontmatter output is limited to just a few widely used fields to avoid bloat. However, you may add new optional frontmatter fields. -To do so, add a new `.js` file into the [/src/frontmatter](https://github.com/lonekorean/wordpress-export-to-markdown/tree/master/src/frontmatter) folder. The filename should be the name of the frontmatter field, camelcased. See the other files there for code examples. +To do so, follow the instructions in [/src/frontmatter/example.js](https://github.com/lonekorean/wordpress-export-to-markdown/tree/master/src/frontmatterexample.js). Users will be able to include your new frontmatter field by editing `frontmatter_fields` in [settings.js](https://github.com/lonekorean/wordpress-export-to-markdown/blob/master/src/settings.js). diff --git a/src/frontmatter/debug.js b/src/frontmatter/example.js similarity index 79% rename from src/frontmatter/debug.js rename to src/frontmatter/example.js index 348cc38..9ecaf8e 100644 --- a/src/frontmatter/debug.js +++ b/src/frontmatter/example.js @@ -4,8 +4,8 @@ 3. Run the script to see post data dumps, to see what you can work with 4. Write your code to get and return what you want 5. Update "get whatever" comment to describe what you're getting - 6. Remove your field name from the default frontmatter_fields in settings.js - 7. Remove this comment block and the console debug code + 6. Remove your field name from frontmatter_fields in settings.js + 7. Remove this comment block and the debug console code 8. Make that pull request! */ @@ -15,5 +15,5 @@ module.exports = (post) => { console.dir(post, { depth: null }); console.log('\nEND POST DATA DUMP =============================================================\n'); - return 'DEBUG: ' + post.data.title[0]; + return 'EXAMPLE: ' + post.data.title[0]; };