I'm looking at implementing https://github.com/wildlyinaccurate/jekyll-responsive-image in my jekyll build. I install it as a gem.
First off - please forgive this rambling question. Secondly, I'm pretty sure this isn't an issue with the plugin but with my limited ruby knowledge but I thought I'd check.
Quick bit of background. I wrote quick and dirty generator plugin to duplicate every post but with a slightly different name for AMP (index.amp.html). It applies a different template and does some text replacement. I have another quick plugin to replace the markdown implementation of images
![funny image](images/hello.jpg)
to the required liquid tag for this responsive image plugin:
{% responsive_image path: assets/my-file.jpg %}
To the crux of my problem, it responsive image plugin doesn't apply to my plugin-generated file in my build process. Is it because of the build order (i.e. when plugins or gems get executed) or because there's some coding that I don't understand in this plugin?
To be a little clearer; So I have a index.html and index.amp.html and they both have the responsive liquid tag but only the index.html gets replaced by the plugin. Is it because the gem is executed before the plugin because the gem is more closely integrated with the actual Jekyll build?
So I've looked at the plugin in greater detail, and I've realised I'm an idiot. Its not doing a regex find content and replace job, its actually doing the site render. So it has no idea my files exist.
I'm going to use grunt to replace this on my amp files I think. Thanks for reading.
Related
we are still on wicket 1.4, which is pretty much EOL.
I'm not an expert with Wicket and this is 5 year old code with parts from the SVN history missing due to branch restructuring, uncommented JIRA tasks for the changes and the original dev long gone.
I've started to look into migration to 1.5 and stumpled across the fact that this project uses patched JS like wicket-event.js, wicket-ajax.js. Additionally, it seems as someone manually added jquery libraries to have them minified and merged and updated manually in the project.
The mounts look like mountSharedResource("/js/wicket-event.js", new ResourceReference(WicketEventReference.class, "wicket-event.js").getSharedResourceKey());
I'm not really sure what to make of that.
The following questions arise:
Any input or follow-up questions on this scenario is very much appreciated. What are your thoughts?
How do I cope with those resource mounts? It is unclear why we have them in the first place, maybe only for the minifying? How does wicket find it's JS resources in the first place?
If I find that a patched JS resource makes sense, like patching it to attach custom classes to elements or add options for dropdown elements. How would I solve this now? Patch again? Use other means to achieve this?
EDIT: this is not only for JS resources, but also for CSS resources. It seems, that most mounts are really only done because we do that minification.
I'd recommend to remove all those custom mounts. This may break your app if you have customizations in wicket-xyz.js but it will most probably not work due to such custom modifications too. The best way for such custom modifications is to use monkey patching.
Once you see that your application works with Wicket 1.5 I'd recommend to upgrade to latest 6.x. Wicket 6.x has a lot of improvements in the management of resources - e.g. it will load some.js in DEV mode and some.min.js in PROD mode automatically.
See http://wicketinaction.com/2012/07/wicket-6-resource-management/ and http://wicketinaction.com/2012/07/wicket-6-javascript-improvements/ for more details.
I'm about to start devlopment of a new website and want to use yeoman/grunt to speed up development/testing. However the site needs to be build with limited CMS functionallty with a flatfile cms such as http://getkirby.com/. Now I'm a little confused as to how to use these tools together?
Anyone had previous experience with this or have any tips?
Thanks
I have a Kirby site with a grunt taskrunner for developement-stuff. I use coffeescript, sass, minification, linting, autoprefixer etc. You could have a look at my current grundfile.coffee or an earlier version of my gruntfile.coffee. I guess they are a good start point - you could pick some tasks you need, and add your own stuff.
But i'm not sure if it answers your question, because all this is nothing Kirby-specific, except the file-paths. So if this is no help, you could specify your question/issue.
Should be pretty simple. I am trying to find what theme is being loaded in Magento to create my own custom theme. The problem is the mine (ver. 1.7.0.2) has no files in the frontend->default->default folder so I can't put any print statements there or see which template Magento is loading to learn more about it. Print statements in base->default don't seem to work either.
And where is the home page template located?
I don't know why Magento makes this so hard or maybe I'm just looking at old info that's not applicable anymore.
Turn on template path hints. Also disable the cache from System > Cache Management while you are doing any theme work.
+1 for other answer suggesting you turn on template path hints. That is a great way to figure out the structure of how things work in Magento.
I would also recommend the user guide. It's been updated to apply to 1.7. You used to have to pay for the guide but they make it available for free now.
http://www.magentocommerce.com/resources/magento-user-guide
As well as the latest designers guide that has info specific for templates etc.
http://www.magentocommerce.com/design_guide
I looked on CKEditor's website and I noticed that there's no plugins documentation yet.
But I'm wondering if there is any anywhere else?
I'd like to make a little plugin to add youtube video from CKEditor. Pretty simple plugin but still I'd like to know how to make it.
Documentation is sparse at the moment, but not completely non-existent.
Check out my CKEDitor link survival pack from a previous question.
As a starting point, you may want to copy and use one of the existing plugins (the unpacked ones from the _source directory, of course).
The symbols plugin is extremely simple but shows the basic points of inserting HTML into the editor
The links plugin may be a good starting point for how to add input fields, tabs, and make them interact (If you want to go the road of understanding CKEditor's highly sophisticated dialog layout system, that is. My cup of tea, it wasn't. You may want to just set up an Iframe dialog, and do everything by yourself).
Since this question was first posted, CK has added documentation for creating plugins - http://docs.cksource.com/CKEditor_3.x/Tutorials/Abbr_Plugin_Part_1
I am using Eclipse 3.4 (ganymede official, not the service pack).
I have an update site that organizes features into categories; everything looks great in the editor and in the XML.
Once the site is online, accessing it in the usual manner tells me that all the features are "uncategorized". I've tried from multiple computers running 3.4 and the same problem persists.
What is curious is that I used Eclipse 3.3, and it saw the categories well, though of course it wasn't able to instlal the plugins which are made from 3.4.
Am I doing something wrong or is this a known problem?
It appears to be a known problem, due to the new 'p2' provisioning system.
See this discussion, and this bug. What it seems to say is... "stay put until 3.5M3, and then try it again".
This solution works for me:
Use the PDE update site project to create the site.xml and build your plugins. Make sure you set the category here.
Delete the artifacts.xml and content.xml created by the update site build.
Use the P2 Metadata Generator to generate your artifacts and content files. I use the compress option so I'm getting jars.
The update site should include: the site.xml, content & artifacts jars, features and plugins folders.
If you follow this procedure, it will work just fine in Eclipse 3.3 and 3.4. Naturally, you should automate this process with Ant.
Important notes:
I never got the metadata generator Ant task to work, so I invoke it in its' Java form (the second example in the link above).
Make sure you clear the artifacts and content xmls before the generation
Inputs: site.xml and built plugins/features folders
Specify the metadataRepositoryName which is the update site title (shown to the user in some cases)
I'll do my best to blog about it soon...
Let me know if you have any questions.
What seems to work for me is to put the tag, defining the category in the site.xml, before the tag including the other category tag. If you add the category with eclipse's editor after adding the feature, it'll have messed that up...
A no-brainer for most..but it can be a problem for newbies on Eclipse update sites: be sure to add your feauture as a child under the category:
See http://ekkescorner.wordpress.com/2010/04/18/who-eats-the-categories-from-update-sites/