Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Atanas Angelov
    @atanas-dev
    The only reason that the constants are not defined is that the WP Emerge framework is not loaded so you'll need to make sure the /vendor/ dependencies are present and the correct path to the autoloader is loaded in functions.php
    Arthos
    @taliesinpenbardd
    hey all. i have a minor problem: chrome requests a HTTPS connection to the sites, even local ones with a .test tld, but the files during yarn hot are served with an HTTP protocol, and are blocked, stopping the HMR to work properly. I've tried to valet secure the local domain, to indicate the HTTPS url in config.json, but without any luck until now. any idea on what i should modify to make it work? thanks
    Alexander
    @xenx-efy
    Hi, appeared problem with webpack, it is shuffle order media queries which we're using for adaptive design, and bundler not save mixins order in source file. And maybe it is not a problem?
    Atanas Angelov
    @atanas-dev
    Hi @xenx-efy ,
    You can disable media query concatenation by editing resources/build/postcss.js and removing require('./lib/combine-media-queries'), from the array of plugins
    This plugin will be disabled by default in future versions as this is an issue that has been reported quite a bit
    Alexander
    @xenx-efy
    @atanas-dev, thank you very much) But it little problem that many developers, in particular backend, don't know how to configure webpack. If this problem would not be solved I start to use laravel-mix) Or just need to learn webpack?)
    codemonkeynorth
    @codemonkeynorth
    should this work: <img src="{{ \App::core()->assets()->getAssetUrl("images/foo.png") }}" /> to load images/foo.png from resources?
    i actually have an asset() function for it but ignore that for now
    i just get "unknown"
    codemonkeynorth
    @codemonkeynorth
    ah i still need to do a dummy import as per htmlburger/wpemerge-theme#61
    codemonkeynorth
    @codemonkeynorth
    @atanas-dev shouldn't filehashfilter contain the path? module.exports.filehashFilter = file =>[path][name].${module.exports.filehash(file).substr(0, 10)}.[ext];
    doesnt work tho
    i cant get images in subfolders to output correctly
    my assets/index.js build script runs import '@images/photos/photo1.jpg'; (see github link above).. this should import and output the image to dist but it's not keeping the subfolder i have to reference it as <img src="{{ asset('images/photo1.jpg') }}" /><
    codemonkeynorth
    @codemonkeynorth
    the webpack file function needs to get the relative path.. eg
    const relativePath = path.relative('resources', path.dirname(file)); //return `${relativePath}/[name].${module.exports.filehash(file).substr(0, 10)}.[ext]`;
    and then not set an output path
    codemonkeynorth
    @codemonkeynorth
    something like this:
    name(file) { const relativePath = path.relative('resources/images', path.dirname(file)); return `${relativePath}/${utils.filehashFilter(file)}`; }, outputPath: 'images',
    or you could remove the "/images" part from resources relative and have no output path
    Atanas Angelov
    @atanas-dev
    Image relative path will be preserved in the next version: htmlburger/wpemerge-theme@90b0910 + htmlburger/wpemerge-theme@eef47b1
    codemonkeynorth
    @codemonkeynorth
    ok thanks
    codemonkeynorth
    @codemonkeynorth
    can i apply these changes manually to the current build or do they rely on anything else?
    codemonkeynorth
    @codemonkeynorth
    ok seems to work thanks
    Calvin Alkan
    @calvinalkan
    @atanas-dev any updates on htmlburger/wpemerge#27 and htmlburger/wpemerge#28 ?
    gus-at-2122
    @gus-at-2122

    Greetings and thanks in advance.

    How can I create a middleware that detects a subdomain and passes it as $ _GET type argument?

    For example: london.mysite.com => mysite.com/q=london

    codemonkeynorth
    @codemonkeynorth
    @atanas-dev new wpemerge site ... I didn’t use much of the backend features on this actually other than blade, but having the whole webpack/tailwind/asset pipeline setup in the starter theme is great for getting started quickly https://www.meatisdead.co.uk/
    Much gratitude to you!
    Atanas Angelov
    @atanas-dev
    Thank you for the positive feedback :)
    codemonkeynorth
    @codemonkeynorth
    Because I had to build it quickly I used global $post at the top of my blade files. This should work fine right? It seems to
    Normally I’d set up controllers and view composers
    And pass to the render view
    Atanas Angelov
    @atanas-dev
    Use the loop, don't use global $post
    codemonkeynorth
    @codemonkeynorth
    You know ... I’ve never used the loop. Even if my more complicated sites :S
    I came from timber I never learned vanilla WP!
    *in
    I will fix it up later with a controller probably. I’ve got no sub queries/posts in the page etc so assumed $post had the data I need.
    Again not normally my approach
    codemonkeynorth
    @codemonkeynorth
    (....to use global)
    Atanas Angelov
    @atanas-dev
    You don't really need a controller just for a simple post loop :)
    Arthos
    @taliesinpenbardd

    Thank you for the positive feedback :)

    I must admit that I never made any feedback, but I've already used WPEmerge theme (with blade) on a certain number of sites, with a lot of happiness... thanks @atanas-dev !

    Atanas Angelov
    @atanas-dev
    Thank you as well :)
    Lee Hilton
    @lhilton
    Hey all! I'm super impressed with WPEmerge. It does just enough, without looking like a pile of unmaintainable headaches (ahemsageahem)
    I'm updating a build script that sets up new projects for me, and I am trying to see if the new rebrand script can take parameters from the command line. Does anyone know if this is possible?
    Atanas Angelov
    @atanas-dev
    Hi @lhilton ,
    The rebrand script is minimal and does not take command line parameters. That being said, the rebrand script is contained entirely within your project so you can edit it as you please: https://github.com/htmlburger/wpemerge-theme/tree/master/resources/build/rebrand
    That being said, note that changing it may cause some conflicts when updating to a future version. You should be comfortable with resolving git conflicts or you can just make a copy of the command :)
    Lee Hilton
    @lhilton
    @atanas-dev Thank you for getting back to me. Seems straight forward enough. Cheers!
    Romain
    @Romaixn
    Hello all ! Is it better to make a controller to make an ajax call? Or is there another solution?
    And how to do that ? (make an ajax call and call it with js)
    codemonkeynorth
    @codemonkeynorth
    I believe ajax is still best done via admin-ajax.php isn't it?
    Romain
    @Romaixn
    Of course, but I see there is a directory named "Ajax" in Controllers (in starter theme). I thought it could be used to make Ajax requests
    codemonkeynorth
    @codemonkeynorth
    Ah yes maybe. I’d not checked
    codemonkeynorth
    @codemonkeynorth