htmlburger / wpemerge-theme Goto Github PK
View Code? Open in Web Editor NEWAn organized, ES6 and SASS powered theme taking advantage of the WP Emerge framework. ๐
Home Page: https://wpemerge.com/
License: GNU General Public License v2.0
An organized, ES6 and SASS powered theme taking advantage of the WP Emerge framework. ๐
Home Page: https://wpemerge.com/
License: GNU General Public License v2.0
Please add the exact versions used for each of the following:
WooCommerce using template files from WPEmerge.
WooCommerce seems to not use template files from WPEmerge.
WPEmerge works great for Wordpress, and I might be missing something now, but as soon as you get to a WooCommerce page it seems to ignore the standard template files (using Blade, but standard ones does the same).
This results in different header, footer, nav and general site structure. It would be nice if WooCommerce is rendered within the existing WPEmerge site structure from the template files.
Have I missed anything to make it work?
I'm in the process of migrating a client website over from Sage, and is well underway but ran into above problems with WooCommerce. Big thumbs up on this project, it's really a breeze to work with.
Please add the exact versions used for each of the following:
Twig is included as one of the project's USP but it is not available inside the https://github.com/htmlburger/wpemerge-theme/tree/master/theme/alternative folder.
Are there any working templates available for new people to work from?
Thanks
Hi!
Since today - when i try to install project with Bootstrap i get error like this: https://jmp.sh/0oxy2cu
Yesterday all worked fine. Maybe this is something with new release?
This documentation package is very difficult!
Unfortunately, the documentation of this package is grossly misleading.
For the easiest thing, you can not use the documentation, for example, the engine does not have the correct guidance for setting up the engine, and in the end I did not succeed.
In the first step, I installed the WP Emerge Blade with Composer.
In the second step, I added the following code in the configuration file (not at all referred to as the file):
\ WPEmergeBlade \ View \ ServiceProvider :: class
What should I do to use it?
Hi,
Firstly thanks for making such a great framework and theme. I'm from a Laravel background so I really want to try this, plus your documentation is top notch. I appreciate the info for Bedrock users.
When do you think you will have TailwindCSS 2 implemented?
While installing CSS framework i get error like this:
Warning: file_get_contents(/Users/kristjankoppel/Propxls/clients/flowit/cms/wp-content/themes/flowit/resources/css/_vendor.css): failed to open stream: No such file or directory in /Users/kristjankoppel/Propxls/clients/flowit/cms/wp-content/themes/flowit/vendor/htmlburger/wpemerge-cli/src/Presets/StatementAppenderTrait.php on line 17
Warning: file_put_contents(/Users/kristjankoppel/Propxls/clients/flowit/cms/wp-content/themes/flowit/resources/css/_vendor.css): failed to open stream: No such file or directory in /Users/kristjankoppel/Propxls/clients/flowit/cms/wp-content/themes/flowit/vendor/htmlburger/wpemerge-cli/src/Presets/StatementAppenderTrait.php on line 33
I wanted to try wpemerge-theme and setup my local WP setup. Then i followed the Quickstart guide found here: https://docs.theme.wpemerge.com/quickstart.html
I chose my options and first time installing i got error:
The process "yarn add "bootstrap@^3.3" --dev" exceeded the timeout of 60 seconds.
Then i removed the whole theme folder and started again. After that i didn't get timeout error only that failed to open stream error. Also i'm using Lando(https://docs.devwithlando.io) for my local development environment.
Frontend/ Backend to load with the starter theme
500 Internal Server Error
On Apache (MAMP etc) stacks, the theme throws a 500 instantly with all dependencies met & installed.
Upon closer inspection, it wasn't a PHP exception but an Apache exception due to duplicate headers being sent. It appears both ResponseService
class from wpemerge
and BladeView
extensible class on wpemerge-blade
are sending 'Content-type' headers which is throwing the exception. In the team I work with, nginx isn't complaining after all.
Line references to the conflicting headers being output (on the starter theme with all dependencies including wpemerge core and wpemerge-blade installed):
/vendor/htmlburger/wpemerge/src/Responses/ResponseService.php
L51 -> respond
function/vendor/htmlburger/wpemerge-blade/src/View/BladeView.php
L56 -> toResponse
functionThe respond
function on wpemerge core seems to be outputting conditionally (if ( ! headers_sent() )
), however, the issue persists.
Commenting out either/ or one of the output resolves the issue. I'm wary of commenting out the headers from being sent as part of the response object on the wpemerge-core as that'll probably strip other headers too. For now, I'm sticking with commenting out the single header addition on BladeView
class.
Any thoughts?
TIA,
Sudarshan
Hi, how use this theme with wpmerge-blade?
Is it normal that standard templates are not defined if they are not explicitly indicated in routs behavior?
Resolve image from any sass file with according hash
I have a .svg file located here : mytheme/resources/images/myfile.svg
I import it into my theme.js
using import '@images/myfile.svg;
The file is well generated as follow : mytheme/dist/images/myfile.12345.svg
In my main index.scss file I have this error : Module not found: Error: Can't resolve '@dist/images/myfile.svg' in 'C:\xampp\htdocs\studiolv\wp-content\themes\mytheme\resources\styles\theme'
...when trying to use url css resolver like so :
cursor: url('~@dist/images/myfile.svg'), pointer;
I didn't change anything from webpack image's file-loader configuration.
Activate theme to contribute.
When run composer install
and then try to activate the theme, is returned and error saying that App::make()
is an undefined method.
composer install && composer run post-create-project-cmd
.Screenshots:
Both have CLI versions (angular CLI and create-react-app) and both generate their own folder structure which is different from the folder structure of wpemerge-theme folder structure. Both have their own webpack configurations and development workflow / dev server so how would one properly integrate these into WordPress wpemerge-theme?
Please add the exact versions used for each of the following:
I expected to see the theme install correctly.
Please describe the expected behavior here.
I expected a complete flawless install with proper configuration and additional options to add my preferred css frameworks
Instead I got this error "Script WPEmerge\Cli\App::createConfigJson handling the post-create-project-cmd event terminated with an exception"
Please describe the actual, unexpected behavior here.
ERROR: Script WPEmerge\Cli\App::createConfigJson handling the post-create-project-cmd event terminated with an exception
[ErrorException]
Trying to access array offset on value of type int
I'm on MacOS Catalina 10.15.2 if that helps.
Please add any other comments here.
I'm using MAMP for development and the dev URL is a local domain (like mydomain.loc). I've set the domain in config.json (as url and hotUrl).
I've also tried to leave the default localhost URL in the config.json and the result is the same (a file listing page).
What am I doing wrong?
Composer create project should create a project without errors.
Got some errors with the default command (from the quickstart https://docs.wpemerge.com/#/starter-theme/quickstart) for a new project:
[130] ./resources/styles/editor/index.scss 41 bytes [built]
+ 120 hidden modules
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js??ref--7-1!node_modules/postcss-loader/lib/index.js??ref--7-2!node_modules/sass-loader/lib/loader.js!node_modules/import-glob/index.js!resources/styles/admin/index.scss:
Entrypoint undefined = extract-text-webpack-plugin-output-filename
[0] ./node_modules/css-loader??ref--7-1!./node_modules/postcss-loader/lib??ref--7-2!./node_modules/sass-loader/lib/loader.js!./node_modules/import-glob!./resources/styles/admin/index.scss 165 bytes {0} [built]
+ 1 hidden module
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js??ref--7-1!node_modules/postcss-loader/lib/index.js??ref--7-2!node_modules/sass-loader/lib/loader.js!node_modules/import-glob/index.js!resources/styles/editor/index.scss:
Entrypoint undefined = extract-text-webpack-plugin-output-filename
[0] ./node_modules/css-loader??ref--7-1!./node_modules/postcss-loader/lib??ref--7-2!./node_modules/sass-loader/lib/loader.js!./node_modules/import-glob!./resources/styles/editor/index.scss 2.26 KiB {0} [built]
+ 1 hidden module
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js??ref--7-1!node_modules/postcss-loader/lib/index.js??ref--7-2!node_modules/sass-loader/lib/loader.js!node_modules/import-glob/index.js!resources/styles/login/index.scss:
Entrypoint undefined = extract-text-webpack-plugin-output-filename
[0] ./node_modules/css-loader??ref--7-1!./node_modules/postcss-loader/lib??ref--7-2!./node_modules/sass-loader/lib/loader.js!./node_modules/import-glob!./resources/styles/login/index.scss 165 bytes {0} [built]
+ 1 hidden module
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js??ref--7-1!node_modules/postcss-loader/lib/index.js??ref--7-2!node_modules/sass-loader/lib/loader.js!node_modules/import-glob/index.js!resources/styles/theme/index.scss:
Entrypoint undefined = extract-text-webpack-plugin-output-filename
[0] ./node_modules/css-loader??ref--7-1!./node_modules/postcss-loader/lib??ref--7-2!./node_modules/sass-loader/lib/loader.js!./node_modules/import-glob!./resources/styles/theme/index.scss 7.23 KiB {0} [built]
+ 1 hidden module
If i continue, the theme installation finish. But when trying to develop with it, "yarn dev" result in the same type of error:
[./resources/styles/theme/index.scss] 41 bytes [built]
[jquery] external "jQuery" 42 bytes {theme} [built]
+ 123 hidden modules
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js??ref--7-1!node_modules/postcss-loader/lib/index.js??ref--7-2!node_modules/sass-loader/lib/loader.js!node_modules/import-glob/index.js!node_modules/bootstrap/dist/css/bootstrap.css:
Entrypoint undefined = extract-text-webpack-plugin-output-filename
2 modules
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js??ref--7-1!node_modules/postcss-loader/lib/index.js??ref--7-2!node_modules/sass-loader/lib/loader.js!node_modules/import-glob/index.js!resources/styles/admin/index.scss:
Entrypoint undefined = extract-text-webpack-plugin-output-filename
[./node_modules/css-loader/index.js?!./node_modules/postcss-loader/lib/index.js?!./node_modules/sass-loader/lib/loader.js!./node_modules/import-glob/index.js!./resources/styles/admin/index.scss] ./node_modules/css-loader??ref--7-1!./node_modules/postcss-loader/lib??ref--7-2!./node_modules/sass-loader/lib/loader.js!./node_modules/import-glob!./resources/styles/admin/index.scss 165 bytes {0} [built]
+ 1 hidden module
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js??ref--7-1!node_modules/postcss-loader/lib/index.js??ref--7-2!node_modules/sass-loader/lib/loader.js!node_modules/import-glob/index.js!resources/styles/editor/index.scss:
Entrypoint undefined = extract-text-webpack-plugin-output-filename
[./node_modules/css-loader/index.js?!./node_modules/postcss-loader/lib/index.js?!./node_modules/sass-loader/lib/loader.js!./node_modules/import-glob/index.js!./resources/styles/editor/index.scss] ./node_modules/css-loader??ref--7-1!./node_modules/postcss-loader/lib??ref--7-2!./node_modules/sass-loader/lib/loader.js!./node_modules/import-glob!./resources/styles/editor/index.scss 3.39 KiB {0} [built]
+ 1 hidden module
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js??ref--7-1!node_modules/postcss-loader/lib/index.js??ref--7-2!node_modules/sass-loader/lib/loader.js!node_modules/import-glob/index.js!resources/styles/login/index.scss:
Entrypoint undefined = extract-text-webpack-plugin-output-filename
[./node_modules/css-loader/index.js?!./node_modules/postcss-loader/lib/index.js?!./node_modules/sass-loader/lib/loader.js!./node_modules/import-glob/index.js!./resources/styles/login/index.scss] ./node_modules/css-loader??ref--7-1!./node_modules/postcss-loader/lib??ref--7-2!./node_modules/sass-loader/lib/loader.js!./node_modules/import-glob!./resources/styles/login/index.scss 165 bytes {0} [built]
+ 1 hidden module
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js??ref--7-1!node_modules/postcss-loader/lib/index.js??ref--7-2!node_modules/sass-loader/lib/loader.js!node_modules/import-glob/index.js!resources/styles/theme/index.scss:
Entrypoint undefined = extract-text-webpack-plugin-output-filename
[./node_modules/css-loader/index.js?!./node_modules/postcss-loader/lib/index.js?!./node_modules/sass-loader/lib/loader.js!./node_modules/import-glob/index.js!./resources/styles/theme/index.scss] ./node_modules/css-loader??ref--7-1!./node_modules/postcss-loader/lib??ref--7-2!./node_modules/sass-loader/lib/loader.js!./node_modules/import-glob!./resources/styles/theme/index.scss 11.7 KiB {0} [built]
+ 1 hidden module
Hello, how to generate colors from frontend.config.scss ? With new colors added in config.json
Thanks ! :)
@SineGrain commented on Thu Aug 02 2018
Hi guys i'm trying to integrate htmlburger/wpemerge-blade with wp-emerge-theme but cannot getting to work.
i installed htmlburger/wpemerge-blade with composer and i added the service provider to config.php
here is my "app/config.php"
<?php
/**
* WP Emerge configuration.
*
* @see https://docs.wpemerge.com/configuration.html
*/
return [
/**
* Array of service providers you wish to enable.
*/
'providers' => [
\WPEmergeBlade\View\ServiceProvider::class
],
/**
* Array of global middleware to apply to all requests.
*/
'global_middleware' => [
],
/**
* Other config goes after this comment.
*/
];
Here is my
"app/src/controllers/MainController.php"
<?php
namespace App\Controllers;
use WPEmerge\Requests\Request;
class MainController {
public function home( Request $request, $view ) {
// Add back-end logic here
// for example, prepare some variables to pass to the view
// or validate request parameters etc.
$name = 'foobar';
// return app_output( 'Hello World!' ); //this line uncommented work and i see the message
//I tried also templates/baselayout || templates/baselayout.blade.php
return app_view( 'templates.baselayout' )
->with( [
'name' => $name,
] );
}
}
Here is my view
"theme/template/baselayout.blade.php"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Test WP-Emerge</title>
</head>
<body>
<p>Hello {{$name}}!!!</p>
@yeld('content')
</body>
</html>
Here is myb "app/framework.php"
<?php
/**
* ------------------------------------------------------------------------
* Routes
*
* @see https://docs.wpemerge.com/routing/methods.html
* ------------------------------------------------------------------------
*/
// Using our ExampleController to handle the homepage, for example.
Router::get( '/', 'App\Controllers\MainController@home' );
// If we do not want to hardcode a url, we can use one of the available route conditions instead:
/*
Router::get( ['post_id', get_option( 'page_on_front' )], 'App\Controllers\ExampleController@home' );
*/
/**
* Pass all front-end requests through WPEmerge.
* WARNING: Do not add routes after this - they will be ignored.
*
* @see https://docs.wpemerge.com/routing/methods.html#handling-all-requests
*/
Router::handleAll();
/**
* ------------------------------------------------------------------------
* Globals
*
* @see https://docs.wpemerge.com/view/global-context.html
* ------------------------------------------------------------------------
*/
/*
View::addGlobal( 'foo', 'bar' );
*/
/**
* ------------------------------------------------------------------------
* View composers
*
* @see https://docs.wpemerge.com/view/view-composers.html
* ------------------------------------------------------------------------
*/
/*
View::addComposer( 'partials/foo', \App\ViewComposers\FooPartialViewComposer::class );
*/
When i load the page i receive ERR_EMPTY_RESPONSE
I am doing something wrong or i miss a config?
@atanas-angelov-dev commented on Thu Aug 02 2018
Hi @SineGrain ,
I believe you are affected by an old bug - please update to the latest versions of everything (wpemerge-theme, wpemerge, wpemerge-blade).
Since the theme is setup using composer create-project
the simplest solution would be to re-setup it the same way.
After that, restart your webserver and give it another try. If you still have the same error after doing that please submit your composer.lock so I can double check the versions installed.
PS:
You have a couple of typos - these are not the cause for the problem, but wanted to mention them so they don't muddy the results:
template
should be templates
@yeld('content')
should be @yield('content')
Being able to actually activate the theme in wordpress.
After following quick start instructions can't activate the theme in wp-admin nor wp-cli.
What am I missing?
WP Emerge Theme to be installed and created at /web/app/themes
composer require htmlburger/wpemerge-theme
Throws an requirement error as follows:
Using version ^0.17.1 for htmlburger/wpemerge-theme
./composer.json has been updated
Running composer update htmlburger/wpemerge-theme
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires htmlburger/wpemerge-theme ^0.17.1 -> satisfiable by htmlburger/wpemerge-theme[0.17.1].
- htmlburger/wpemerge-theme 0.17.1 requires composer/installers ^1.4 -> found composer/installers[v1.4.0, ..., 1.x-dev] but it conflicts with your root composer.json require (^2.1).
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require htmlburger/wpemerge-theme:*" to figure out if any version is installable, or "composer require htmlburger/wpemerge-theme:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
composer create-project roots/bedrock
cd
to root folder of your bedrock installcomposer require htmlburger/wpemerge-theme
Just followed official documentation found at https://docs.wpemerge.com/#/starter/theme/quickstart (the Quick start on Bedrock section).
Theme should initialize.
Uncaught WPEmergeTheme\Concerns\JsonFileNotFoundException: The required manifest.json file is missing. Please run one of the build commands to generate it.
Seems the theme is looking for a manifest.json file. The function is called here:
wordpress\wp-content\themes\wpemerge-me\vendor\htmlburger\wpemerge-theme-core\src\Assets\Manifest.php
Please add the exact versions used for each of the following:
By the info shown at /resources/build/browsersync.js (injectCss = true) i think the theme should hot-reload and inject the css without a full page reload.
Changing some SCSS will trigger a full page reload.
Video: https://photos.app.goo.gl/mszfYYFiffmzbsmM8
yarn dev at 40 seconds mark.
Method found
Fatal error: Uncaught Error: Call to undefined method WPEmergeTheme\Theme\Theme::make()
in /usr/src/wordpress/wp-content/themes/project/theme/functions.php:66 Stack trace: #0
/usr/src/wordpress/wp-settings.php(499): include() #1 /usr/src/wordpress/wp-config.php(152):
require_once('/usr/src/wordpr...') #2 /usr/src/wordpress/wp-load.php(37):
require_once('/usr/src/wordpr...') #3 /usr/src/wordpress/wp-blog-header.php(13):
require_once('/usr/src/wordpr...') #4 /usr/src/wordpress/index.php(17):
require('/usr/src/wordpr...') #5 {main} thrown in /usr/src/wordpress/wp-content/themes/project/theme/functions.php on line 66
I have a particular config but it works fine for other project.
I run all my projects in docker container inside VM.
So I mount the code project (with node modules and vendor) inside docker.
I could install wordpress correctly.
Editor styles are correcting recognised, transformed and inlined by Gutenberg.
Editor styles are not recognised so the default styles are inlined instead.
This cause having to rely on unnecessary CSS !important rules or additional selectors.
Solved by commenting out the current editor.css enqueue in app/helpers/assets.php
in favour of adding:
/**
* Support the themeโs editor styles.
*
* @link https://developer.wordpress.org/block-editor/developers/themes/theme-support/#editor-styles
*/
add_theme_support( 'editor-styles' );
add_editor_style( '../dist/styles/editor.css');
to app/setup/theme-support.php
Please add the exact versions used for each of the following:
Please describe the expected behavior here.
Expect running yarn start to use the development url specified in config.json
Please describe the actual, unexpected behavior here.
No matter what is entered, localhost:3000 is used for CSS/JS assets.
Please add any other comments here.
Running local dev under Laravel Valet and need to specify the local URL for outputting CSS/JS paths.
master (2020-10-07)
https://github.com/htmlburger/wpemerge-theme/blob/master/package.json
"yarn lint-fix" should work
File wpcs.xml is not found
I guess it should use --standard=phpcs.xml link lint:wpcs command ?
Hai i am running
composer create-project htmlburger/wpemerge-theme your-theme-name
`Generating autoload files
WPEmerge\Cli\App::createConfigJson
composer create-project wp-coding-standards/wpcs --no-dev
sh: composer: command not found
Script composer create-project wp-coding-standards/wpcs --no-dev handling the install-wpcs event returned with error code 127
Script @install-wpcs was called via post-create-project-cmd`
Is it correct that at the moment developers can't make sprite out of svg files? I looked at config files and so that something like spritesmith is used. I also searched for spritesmith documentation and didn't find anything about svg's.
So if it is correct then i propose for a feature request here :) Maybe something that can deal with svg files and make sprite out of them. OR something that would generate data:uri code.
It would be useful to be able to process images that aren't directly referenced/findable in css/js etc and so get missed out of dist
images in subdirectories eg resources/images/icons
should be output with the same path structure
=> observe image is not output to /dist/images/icons/icon_{manifest_id}.png
re: image paths.. the following code is a potential fix...
name: (f) => {
const dirNameInsideResources = path.relative('resources', path.dirname(f));
return `${dirNameInsideResources}/[name].${utils.filehash(f).substr(0, 10)}.[ext]`;
},
re: image references & compiling as asset
Currently I create a scripts/assets/index.js
file to reference any images that aren't used in css or js directly so it picks them up and outputs them to dist\images
accordingly.
(It creates a dummy assets.min.js
file which doesnt need to be used by anything on the site. It's not perfect but is a way to ensure images are picked up and output to dist
)
eg if I import '@images/test/test-emblem.png';
in my assets/index.js
then this is output to the dist folder
/images/test/test-emblem.44a9352841.png
I then have an asset
helper function
<img src="{{ asset('images/test/test-emblem.png') }}" />
function asset($file) {
$asset = \App::core()->assets()->getAssetUrl($file);
return $asset;
}
hopefully some of this could maybe incorporated by default?
thanks
J
I'm not very strong in webpack settings, since there are also pressets in the laravel, so can you tell me how to properly integrate Vue js into this topic? :)
Route::get()->url( '/hello' )->handle( function() {
return WPEmerge\view( 'templates/about-us.php' )->withStatus( 200 );
} );
Error :
Call to undefined method WPEmerge\View\PhpView::withStatus()
Please add the exact versions used for each of the following:
I don't see any reason to do versioning on my cache files. Am I missing something?
theme/cache directory is not git ignored, so it is being commited. Is there any problem if I ignore it? Why it should not be like this by default?
Please add the exact versions used for each of the following:
I'm running on Windows, if that helps.
yarn release
generates a valid zip archive.
yarn release
generates an invalid zip archive. The zip cannot be opened/extracted.
No errors shown while executing the command.
Tried opening with PeaZip and Windows zip utility.
composer create-project htmlburger/wpemerge-theme your-theme-name
.cd your-theme-name
..\vendor\bin\wpemerge install
(I have to use these slashes).yarn release
.I think this is probably an issue with the archiver
package. Seems to have some open issues on Windows but couldn't find an exact one.
wpemerge-theme-core/src/Assets/Assets::generateFileVersion()
should return file versions with Bedrock Wordpress installations.
The function always returns false, even that asset file exists.
We are using Bedrock boilerplate for wordpress projects, as it provides modern file structure, supports managing plugins, themes and localizations through composer and treats Wordpress as a dependency.
Bedrock has the following project structure by default:
- project
- web (webroot, /)
- app
- mu-plugins
- plugins
- themes
- languages
- wp (Wordpress folder)
The issue is that while generally WP Emerge works fine with Bedrock, the function wpemerge-theme-core/src/Assets/Assets::generateFileVersion()
does not return a file version.
project.com
)https://project.com
https://project.com
and site_url will be https://project.com/wp
home_url
instead of site_url
wp/
from ABSPATH: // Generate the absolute path to the file
$file_path = str_replace(
[$home_url, '/'],
[str_replace('wp/', '', ABSPATH), DIRECTORY_SEPARATOR],
$src
);
Could you implement a fix to this or suggest a way to override generageFileVersion
?
Hi, how i can upload localization files for this repo?...
i added this route on admin.php
Route::get()->where( 'admin', 'my-custom-admin-page-slug' )->handle( 'ExampleController@admin' );
how to access this route ?
http://wordpress.test/wp-admin/my-custom-admin-page-slug ?
Hello, it's possible to update TailwindCSS to latest version during install ?
For the moment, it's install tailwindcss version 1.1.2.
To be able to upload the .zip directly into the theme section of the wp-admin
Install fail, because it can't find the necessary files in the theme.zip like style.css, index.php and such. They should be at the root of the theme to enable this behaviour, but then the theme is not working, because of broken paths.
Please add the exact versions used for each of the following:
Installing the theme with Composer v2 should work.
Problem 1
- Root composer.json requires dealerdirect/phpcodesniffer-composer-installer ^0.5.0 -> satisfiable by dealerdirect/phpcodesniffer-composer-installer[v0.5.0].
- dealerdirect/phpcodesniffer-composer-installer v0.5.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.
composer create-project htmlburger/wpemerge-theme wpemerge
.Seemingly, updating composer.json > dealerdirect/phpcodesniffer-composer-installer
to "^0.7" seems to fix it, but im not sure of the side-effects.
$ npm -v
6.4.1
$ php -v
PHP 7.2.11-2+020181015120510.9+jessie1.gbp8105e0 (cli) (built: Oct 16 2018 03:39:58) ( NTS )
On install on these using the quick start guild im guessing the following error on the composer step
We use node in a docker container and have different ports for our differents projects.
We need to configure the port used by browsersync instead of the default 3000.
A PR will follow to address this little improvement.
Home controller home method should be called
The route is not going through the home controller
I added in src/Controllers/Web/HomeController.php
<?php
namespace App\Controllers; // with and without
class HomeController {
public function index( $request, $view ) {
return WPEmerge\view( 'templates/home' );
}
}
In routes/web.php, the following is not working
Route::get()->url( '/' )->handle( 'HomeController@index' );
while the following return the expected template
Route::get()->url( '/' )->handle( function() {
return WPEmerge\view( 'templates/home' );
} );
May I suggest you add to the starter theme basic usage like first route + first controller so it is easier for people to start / replace.
Hey, thank you for developing such a good starter theme.
It's been working smoothly, however there is one issue regarding woocommerce.
Some templates need to be overridden, however WP Emerge does not fallback to lookup for views in woocommerce plugin. This makes it necessary to copy all files into theme/woocommerce
directory.
Is there a workaround for this?
Would be very grateful for help!
This is the same issue as described here htmlburger/wpemerge#19
The same error at the end: https://tppr.me/euzLs
For the sake of order, will copy that issue here:
Version
WP Emerge: 0.15.1
WordPress: 5.3
PHP: 7.4
Expected behavior
Install the theme using the composer without any error.
Actual behavior
I'm receiving the following error:
Installing htmlburger/wpemerge-theme (0.15.1)
Generating autoload files
PHP CodeSniffer Config installed_paths set to ../../wp-coding-standards/wpcs
WPEmerge\Cli\App::createConfigJson
Script WPEmerge\Cli\App::createConfigJson handling the post-create-project-cmd event terminated with an exception
[ErrorException]
Trying to access array offset on value of type int
Steps to reproduce
using PHP 7.4, do:
composer create-project htmlburger/wpemerge-theme my-wp-theme
Comments
I haven't found any issue related to PHP 7.4 so i'm creating this one.
I was able to install the theme with PHP 7.3
Please add the exact versions used for each of the following:
Theme should initialize
get Uncaught RuntimeException: The required theme config.json file is missing.
Seems the theme-core is looking for a config.json, but the only one existing is config.json.dist
Please add the exact versions used for each of the following:
my project is divided into 2 plugins and a theme 1 plugin will be the admin plugin so I will need all stuff in the Starter plugin for the internal WordPress admin. my second plugin is Gutenberg blocks, most of the blocks will be dynamic ( not ACF blocks ) but I want to use wp emerge-twig for my dynamic blocks. And lastly, a Theme that will use your twig package also for general templates and will properly use all other things. that come with the Starter theme.
" By the way, I use a regular composer setup in bedrock with trellis"
so the question: how can I set up all the Three should any of them have its own setup.?
Please describe the expected behavior here.
Please describe the actual, unexpected behavior here.
Please add any other comments here.
thanks and best regards
When installing TailwindCSS via php wpemerge install
, it copies the base/components/utilities at the end of the file :
/* ------------------------------------------------------------ *\
Vendor
\* ------------------------------------------------------------ */
@import './vendor/*.scss';
/* ------------------------------------------------------------ *\
Settings
\* ------------------------------------------------------------ */
@import '~@styles/frontend.config.scss';
@import '~@styles/shared/_variables.scss';
@import '~@styles/shared/_editor.scss';
@import './_variables.scss';
@import './_sprite.scss';
/* ------------------------------------------------------------ *\
Theme
\* ------------------------------------------------------------ */
@import '~@styles/editor';
@import './_generic*.scss';
/* ------------------------------------------------------------ *\
Tailwind CSS
\* ------------------------------------------------------------ */
@import "~tailwindcss/base";
@import "~tailwindcss/components";
@import "~tailwindcss/utilities";
making it take precedence on everything else. It would be more logical (to me, at least), that it would be installed at the beginning of the file, making the custom rules the definitive ones.
/* ------------------------------------------------------------ *\
Tailwind CSS
\* ------------------------------------------------------------ */
@import "~tailwindcss/base";
@import "~tailwindcss/components";
@import "~tailwindcss/utilities";
/* ------------------------------------------------------------ *\
Vendor
\* ------------------------------------------------------------ */
@import './vendor/*.scss';
/* ------------------------------------------------------------ *\
Settings
\* ------------------------------------------------------------ */
@import '~@styles/frontend.config.scss';
@import '~@styles/shared/_variables.scss';
@import '~@styles/shared/_editor.scss';
@import './_variables.scss';
@import './_sprite.scss';
/* ------------------------------------------------------------ *\
Theme
\* ------------------------------------------------------------ */
@import '~@styles/editor';
@import './_generic*.scss';
Being able to reference an image using getAssetUrl when in yarn hot reload mode.
Can't reference an image, getAssetUrl method returns empty string.
If you instead run "yarn start", it will process the image and build the correct manifest.json https://tppr.me/wwJKs so the referenced image inside the theme's file will work https://tppr.me/g7FQk
var_dump on the getAssetUrl method while on hot reload mode https://tppr.me/Z7FDm will output an empty string https://tppr.me/gsaaC
like the title said and also the comment from the actual file "# Disable access to any theme files outside of dist/."
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.