I'm trying to implement search on my Jekyll site using Lunar JS with this plugin. https://github.com/slashdotdash/jekyll-lunr-js-search
I'm following the instructions in the readme but to a beginner they are not so clear.
I've followed everything up to step 5, ie added all the scripts to my template, and created a search box and container for my search results on the page I want to have search functionality.
However, step 6 says: "Create a Mustache template to display the search results." Where do I need to put this code? In a separate file? Or on the same page as I have my search box?
And step 7 requires me to add:
`indexUrl: '/search.json', // URL of the `search.json` index data for your site`
Can somebody explain what this means? I know lunrjs is supposed to create a json file with all my blog data, but I can't find this json file anywhere. Am I doing something wrong?
You need to make sure that you have the json and nokogiri ruby gems installed. Type:
gem install json
gem install nokogiri
Related
I will be brief. I have been trying to teach myself how to use some of the basics of PDFKit in Ruby on Rails. This weblink is all of the steps that I have followed.
http://blog.clecotech.com/2014/08/download-pdfs-in-rails-using-pdfkit-gem.html
I followed everything exactly, as well as installing all of the required gems. Unfortunately, whenever I create the "link_to", the localhost will not display the page. It keeps giving me this error message in red font saying, "We're sorry. Something went wrong." But it does not show me where the error is located.
I advise you use pdfgen gem, this gem used puppeteer and headless chrome under hood, this is the fastest way do generate pdf in my opinion.
temp_file = Tempfile.new("test.pdf")
html = ApplicationController.render('pdf_view', layout: false, locals: {})
temp_file << Pdfgen.new(html).launch_options(args: ['--no sandbox']).to_pdf(printBackground: true)
temp_file.close
You just render you view into pdf and then get file ready
I'm working on the documentation (https://global-coffee-data-standard.readthedocs.io) of my JSON schema (https://raw.githubusercontent.com/andrejellema/GlobalCoffeeDataStandard/master/schema/global-coffee-data-standard.schema.json)
The basics I have working (thanks to a lot of help from this forum) but now I would like to include the docson widget to show my code more beautiful (https://global-coffee-data-standard.readthedocs.io/en/latest/explanation.html#id13)
I've read this page https://threesixtygiving-standard.readthedocs.io/en/latest/_static/docson/README/ and I'm wondering how to install docson locally but more important on ReadTheDocs.
Do I need to run npm i docson localy? If so which files do I commit to my _static folder so ReadTheDocs can work with it as well?
Or can I put some magic in conf.py to let Sphinx handle it?
EDIT
I tried adding the docson files to my _static folder and it seems to work when I add this code to my ReST file:
<script src="_static/docson/js/widget.js" data-schema="https://raw.githubusercontent.com/andrejellema/GlobalCoffeeDataStandard/master/schema/global-unique-id.json"></script>
But only when I add just one docson widget. When I add more I get this error in the console:
only one instance of babel-polyfill is allowed.
So I'm assuming this is not the correct workflow.
What is the correct workflow to add multiple docson widgets to my page.
Am very new to sencha architect. I need to do localization in sencha architect. Using extjs 5, I refer http://docs.sencha.com/extjs/5.0/core_concepts/localization.html document.
And trying without Sencha Cmd.
Getting error as localhost/projectname/js/pt_BR.js file not found. Not able to get any working examples.
ext-all and ext-locale-es if any updating as mentioned above inindex.html. Its not able to fetch js from the path. so i gave exact path location for both js files.
Please let me know whats the mistake am doing.
Got It
Add "requires": ["ext-locale"] in app.json in created project file.
Add the preferred language "locale": "es" in app.json out side requires
Should not preview the project. Need to create a build. Click build web app in tool bar.Before that click build setting and set the path to save the files. Once clicking buil web app. App will be builded in specified path.
All the default stings will be changed to mentioned language. (In app.json we mentioned "locale": "es" spanish language.)
default strings like ok button, date picker, etc. Labels will not be updated with app.json language we need to add labels plugin.
Sorry for the noob question but I'm trying to start up a new application with Sails and include my assets. I'm using Bower to manage my packages for things like Bootstrap and JQuery. I had a read of this question and added a .bowerrc file which is now installing my Bower components to /assets.
I'm now confused as to how I should proceed to add these files into my project. It seems as though I can't just do a <script> tag in the header as I'm used to because it's giving me a file not found. Reading through the sails documentation it seems like Grunt should be creating a .tmp/public/assets folder in my project, but whenever I run sails lift and go to .tmp/ there is nothing in there.
I also read in the documentation that I should be using some kind of asset injection, I tried adding this to my HTML and it seems like it doesn't do anything.
My other question is around how I go about referencing images in my HTML. Obviously I can't just do something like src='assets/images/image.png, how should I go about this? Is there something really obvious that I'm missing?
Sails use grunt tasks to do lot of things during lift and build. You can get much better look how everything work if you take some time and check what is inside Gruntfile.js from root of your sails project.
About your specific question here is some information:
- from sails docs: "In order to take advantage of asset injection, minification, and concatenation you must put your assets in folder under assets/linker". This exactly mean that everything what you will put inside assets/linker directory will be affected by grunt tasks during lift. It mean that all files/directories from linker will be copy to .tmp/public and also some of that files will be processed before saved to .tmp/public.
- About adding tags. If you take a look at Gruntfile.js you will find this variables: var cssFilesToInject = [...] and var jsFilesToInject = [...] which contain files that will be automatic added to layout header during sails lift.
- About your 'other question', yes you can do something like 'src='linker/images/image.png' if you move that files to linker directory (assets/linker).
I hope this help :).
We're using the new v2 BoxSDK, and followed the steps on the github repo to integrate it as a subproject. Everything builds and runs fine, but we can't archive the project. We get the error:
Lexical or Preprocessor Issue: 'BoxSDK/BoxSDK.h' file not found
I've tried several combinations of setting User Header Search Paths, but can't seem to find anything that works. It looks like the header files are being put in:
"IntermediateBuildFilesPath/UninstalledProducts/include"
Has anyone had any luck getting the v2 BoxSDK working in an app when archiving?
Thanks for any help.
Finally worked it out. You have to add the following entry to your Header Search Paths:
"$(PROJECT_TEMP_DIR)/../UninstalledProducts/include"
Make sure you have the quotes in there.
Add "$(BUILT_PRODUCTS_DIR)" to your header search path.
On XCode 7.1 following Header Search Path worked for me for the Release Build
$(PROJECT_TEMP_DIR)/../UninstalledProducts/iphoneos/include