themehybrid / mythic

Mythic is a next-generation starter theme designed to help theme authors write elegant, intelligent, and modern code.
https://themehybrid.com/themes/mythic
GNU General Public License v2.0
237 stars 43 forks source link

Tutorial and doc idea thread #59

Open justintadlock opened 5 years ago

justintadlock commented 5 years ago

Just opening this topic to keep a running list of tutorial ideas on things related to Mythic, which includes Hybrid Core and other add-ons.

Leave other ideas below.

peiche commented 5 years ago

I would love a clear plan of action on incorporating SVGs. In my fork (not committed), I've added a task inside webpack.mix.js which uses SVGSpritemapPlugin to grab all the SVGs inside /resources/svg and bundle them up in a single sprite. From there, I'm using the sprite with helper functions based on Twenty Seventeen.

justintadlock commented 5 years ago

@peiche - SVGs are the one area we never fully agreed on. There are multiple ways of handling them, depending on the specific circumstance. Right now, I'm not sure that I could appropriately cover a good tutorial on SVG use.


My personal favorite way of using SVGs is to change something like icon.svg to icon.svg.php (make it a PHP file). Then, include it like:

include( get_parent_theme_file_path( 'dist/svg/icon.svg.php' ) );

I'd create something like an svg() function as a wrapper for that, of course.

JakeHenshall commented 5 years ago

@justintadlock Hi,

Do you have any documentation that you could share on:

Thanks, Jake.

justintadlock commented 5 years ago

@JakeHenshall - The Customize class I have planned for my next Mythic tutorial. I've got the beginning of an outline right now.

There are no immediate plans on the hybrid-customize project yet. I'll add it to the above list though. Edit: Nevermind. I already have it on the list. :)