Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the ability to specify a pre-process function, enabling the inclusion of a custom function for data processing. #577

Closed
wants to merge 950 commits into from

Conversation

mohamedsalem401
Copy link
Contributor

@mohamedsalem401 mohamedsalem401 commented Oct 18, 2023

Pull Request Description

Issue Resolved

Summary

This pull request addresses two specific issues and introduces a valuable enhancement to the Flowershow project. It enables users to add custom functionality before processing files, thus making it more versatile and accommodating for custom plugins or other enhancements.

Details

  1. Custom Pre-Processing Functionality
    Introduced a pre-processing function, preProcess, which allows users to customize the content before further processing. Here is an example of this function:

    export default function preProcess(content) {
      // Replace all occurrences of "=>" with "⟹"
      return content.replace(/=>/g, '⟹');
    }

This enables users to define their own pre-processing logic, such as replacing characters with emojis, adding or removing content, and more.

  1. Issue Auto-convert => and <= and <=> to nicer unicode versions (like obsidian preview does) to avoid errors on build #519
    The introduced changes effectively address Issue #519 by providing a flexible pre-processing step.

  2. Issue [Question] mdxjs error with Days: [[2023-06-22]] <== [[2023-06-23]] ==> [[2023-06-24]] #527
    These changes also resolve Issue #527.

User Customization

The ability to define custom pre-processing logic empowers users to create unique enhancements to Flowershow, like custom plugins or features that were not possible before. This new capability makes Flowershow even more versatile and user-friendly, allowing for a wide range of content transformations.

khalilcodes and others added 30 commits February 1, 2023 22:52
Closes datopian#163 

New feat: Page comments / discussions

### Changes
* Create components in core for giscus, utterances and disqus
* Add configs in frontmatter and config.js
* Core version bump 0.2.0
* Add env variables ((netlify) for giscus
* Create documentation
Custom giscus.json file in site's root to restrict the domains that can load giscus with our repository's discussions.
add prop-types dependency as disqus-react fails to resolve module when creating new flowershow site.
…uping

* basic grouping by 1st level content dir subfolders
skip @netlify/plugin-nextjs (next-runtime) during build as we don't need it when using next export.
https://github.com/netlify/next-runtime#use-with-next-export
- use nx target on template package to start the test webserver from within the `packages/template-e2e` folder (this is what caused errors in the workflow, as the server wouldn't start if using cd or npm run dev --prefix)
dependabot bot and others added 23 commits July 13, 2023 11:08
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](npm/node-semver@v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…/semver-6.3.1

Bump semver from 6.3.0 to 6.3.1
update actions version and bump nodejs to current lts
🛠️fix: footer position for page with short content
…lusion of a custom function for data processing.
@vercel
Copy link

vercel bot commented Oct 18, 2023

@mohamedsalem401 is attempting to deploy a commit to the Datopian Team on Vercel.

A member of the Team first needs to authorize it.

@rufuspollock
Copy link
Member

@mohamedsalem401 thanks for the substantive contribution. We'll take a look!

@rufuspollock
Copy link
Member

@mohamedsalem401 my one immediate thought is whether it would be better to do this as a remark plugin ... (they are pretty easy to write and allow this raw regex type stuff) - see e.g. our existing remark plugins here https://github.com/datopian/portaljs/tree/main/packages/remark-callouts

@rufuspollock
Copy link
Member

@mohamedsalem401 can we re-open this PR and look at it again. I think it could be a simple way to do some things ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet