Naereen / StrapDown.js

:sparkles: StrapDown.js is an awesome javascript tool to quickly publish nice-looking web-pages in pure Markdown :pencil:, with no server side compilation :sunglasses: →
https://naereen.github.io/StrapDown.js/
MIT License
108 stars 45 forks source link

Update strapdown.js to support custom squirts and copyrights using the <squirt> and <copyright> tags in <head>. #11

Open ElnuDev opened 3 years ago

ElnuDev commented 3 years ago

Fixes #10. Minified file needs to be updated.

My apologies if I've done something wrong, this is my first pull request on GitHub!

Naereen commented 3 years ago

Oh, that's an interesting trick!

Can you please show a screenshot of how it looks on one of your page, with/without both and tags?

I'll try it myself, then merge your pull-request, and update the minified files.

I would also like to note that if HTML purists see your custom and tags, they won't be happy about them, but I don't care.

ElnuDev commented 3 years ago

Thanks for taking a look!

Here's my page with <squirt> and <copyright>: Screenshot from 2021-01-23 11-25-30

Here's my page without <squirt> and <copyright>: Screenshot from 2021-01-23 11-28-54

I'm not sure, perhaps it would be better just to have one tag (<subtitle>, perhaps?) that allows complete customizability and covers the whole section, instead of being forced to used <squirt> and <copyright>.

Naereen commented 3 years ago

I like your approach, as it allows to customize the location and content of the copyright notice.

I would also like to add an option, that works like the others currently supported by StrapDown.js : see this page for more details : https://naereen.github.io/StrapDown.js/example5.html

I'll do it myself, probably adding nosquirt=y and nocopyright=y. Except if you have a better suggestion? (I'll wait for a reply before merging this PR and adding my idea of these two tiny options)

ElnuDev commented 3 years ago

That sounds like a good idea! It's certainly cleaner than only being able to have empty <squirt> and <copyright> tags, which is the only way to remove the squirt and copyright in the system I set up.