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

Add Markdown Post/Preprocessors #483

Closed
Tracked by #308
caendesilva opened this issue May 31, 2022 · 1 comment · Fixed by #488
Closed
Tracked by #308

Add Markdown Post/Preprocessors #483

caendesilva opened this issue May 31, 2022 · 1 comment · Fixed by #488
Assignees

Comments

@caendesilva
Copy link
Member

caendesilva commented May 31, 2022

Key rule when adding shortcodes. They should be semantic. You shouldn't have to look up the syntax, instead the shortcode should be in a way that the source Markdown makes sense and is readable even when it is not being processed by Hyde.

For example, >info to make an info blockquote, in my opinion, makes immediate sense and lets met know that the string is meant to convey some info. As I have experience with Markdown, I also know that it will be rendered as a blockquote. And when I'm trying to remember how to make a blockquote that contains a warning, it's easy to remember that all I need to do is append the word warning to a normal blockquote.

Same with the new filepath shortcode, it transforms a syntax already commonly used -- like magic!

```php
// Filepath: hello.php

echo "A filepath label will automatically be added";
```
@caendesilva
Copy link
Member Author

The system I'm working on now is pretty cool, but adds a lot of complexity. We'll see how it goes, maybe it belongs in a dedicated package.

@caendesilva caendesilva linked a pull request Jun 2, 2022 that will close this issue
4 tasks
caendesilva pushed a commit that referenced this issue Sep 9, 2022
Rename Hyde method getSiteOutputPath to sitePath hydephp/develop@c39e2e4
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 a pull request may close this issue.

1 participant