Comments (22)
Attaching a screenshot just for reference.
from ace-documentation.
I figured this one out. If you open themes/ace-documentation/layouts/partials/footer.html
You can replace:
<!-- Load required Javascript -->
<script src="{{ .Site.BaseURL }}lib/jquery.min.js"></script> <!-- jQuery.js -->
<script src="{{ .Site.BaseURL }}lib/popper.min.js"></script> <!-- Popper.js - dependency of Bootstrap -->
<script src="{{ .Site.BaseURL }}js/bootstrap.min.js"></script> <!-- Other javascript -->
With:
<!-- Load required Javascript -->
<script src="{{ .Site.BaseURL }}/lib/jquery.min.js"></script> <!-- jQuery.js -->
<script src="{{ .Site.BaseURL }}/lib/popper.min.js"></script> <!-- Popper.js - dependency of Bootstrap -->
<script src="{{ .Site.BaseURL }}/js/bootstrap.min.js"></script> <!-- Other javascript -->
Note the additional slashes after the three instances of {{ .Site.BaseURL }}. Adding these slashes directs your browser to the correct location for the javascript and seems to make the difference.
from ace-documentation.
But my footer.html file was already empty. Isn't that weird?
from ace-documentation.
Hi, will investigate this issue in the coming week. Apologies for slow response, very busy with other stuff!
from ace-documentation.
No issues, @julianflapper!!
Is there any update on this though?
from ace-documentation.
As for the time being, I've disabled the search bar on my website. But I would really love to have a search bar, so if you need any information from my side, do let me know.
from ace-documentation.
@PRUBHTEJ looking at your repo, are you even using Hugo and Ace? It looks like the entire theme structure is not present, nor do I see any of the config or Markdown files.
Also, when loading your site, none of the Javascript libraries are loaded: jQuery, Popper, Bootstrap, and also none of the search libraries: Lunr, auro-complete, search.js, etc.
I would advise you to try a fresh installation of Hugo and Ace and see if the search works there. Because for me it does, to it must be something on your end.
The ""/" characters you've added in your footer shouldn't be necessary. Check if you have a "/" behind your baseURL variable in your config.toml.
from ace-documentation.
Are you viewing this repo: https://github.com/SynBioHub/synbiohub-docs ?
or this: https://github.com/SynBioHub/synbiohub.github.io
Since the first one I've been using that as the source code repo
from ace-documentation.
@PRUBHTEJ no I was viewing the other repo you tagged.
But still, you don't have the correct footer file:
Should be:
https://github.com/vantagedesign/ace-documentation/blob/master/layouts/partials/footer.html
Unless you've made major changes to the theme, I would advise to just reinstall the theme alltogether to make sure everything is installed correctly.
from ace-documentation.
No, actually, I did not do any changes to the theme.
from ace-documentation.
I'll change the footer.html file.
from ace-documentation.
@PRUBHTEJ I would then just remove the entire Ace theme and re-install it to make sure everything is correct.
from ace-documentation.
Okay, I'll do that then!
Thanks for your guidance, if I get any issues I'll get back to you
from ace-documentation.
@PRUBHTEJ if solved, please close the issue. Good luck :)
from ace-documentation.
Sure!
You're super helpful. I'm trying the remedy as of now.
from ace-documentation.
The footer.html file shall be auto generated upon hugo-D?
from ace-documentation.
@PRUBHTEJ is it empty again? It shouldn't be empty. It should be exactly as how I sent it a few messages ago
from ace-documentation.
What I did was to remove hugo and as well as ace and then reinstalled them, but still footer.html is empty.
from ace-documentation.
@PRUBHTEJ lol weird, that can't be because you're downloading this repo and that includes this file:
https://github.com/vantagedesign/ace-documentation/blob/master/layouts/partials/footer.html
which isn't empty
from ace-documentation.
I'll reinstall it again and get back to you.
from ace-documentation.
I also had some issues with the search bar. I didn't find what was the real problem but what I did to solve this was to start working off the exampleSite
and replace it with my own content.
from ace-documentation.
I have the same problem, and I was able to boil down the error to the following: http://localhost:1313/index.json
is not found.
What I wonder is, why isn't it found? The index.json
file that came with the theme is inside the layouts
folder, as it should.
This is from line 14 of plugins/search.js
:
// Initialize lunrjs using our generated index file
function initLunr(success_callback) {
if (!endsWith(baseurl,"/")){
baseurl = baseurl+'/'
};
// First retrieve the index file
$.getJSON(baseurl +"index.json") // Fails right here.
.done(function(index) {
pagesIndex = index;
// Set up lunrjs by declaring the fields we use
// Also provide their boost level for the ranking
lunrIndex = new lunr.Index;
lunrIndex.ref("uri");
lunrIndex.field('title', {
boost: 15
});
lunrIndex.field('tags', {
boost: 10
});
lunrIndex.field("content", {
boost: 5
});
// Feed lunr with each file and let lunr actually index them
pagesIndex.forEach(function(page) {
lunrIndex.add(page);
});
lunrIndex.pipeline.remove(lunrIndex.stemmer)
success_callback();
})
.fail(function(jqxhr, textStatus, error) {
var err = textStatus + ", " + error;
console.error("Error getting Hugo index file:", error);
});
}
The index.json
file for reference:
[
{{ range $index, $page := .Site.Pages }}
{{- if and (ne $page.Type "json") (ne $page.Type "html") -}}
{{- if and $index (gt $index 0) -}},{{- end }}
{
"uri": "{{ $page.Permalink }}",
"title": {{ $page.Title | jsonify }},
"tags": {{ $page.Params.tags | jsonify }},
"description": {{ .Description | jsonify }},
"content": {{$page.Plain | jsonify}}
}
{{- end -}}
{{- end -}}
]
from ace-documentation.
Related Issues (20)
- Responsive Menu HOT 1
- Question: Multiple projects HOT 1
- is it possible to change the colours? HOT 2
- No menu bar while deploying using github pages HOT 12
- How to insert HTML sortable tables in Hugo? HOT 1
- failed to extract shortcode: template for shortcode "lead" not found HOT 1
- Unable to scroll down the Sections Bar on the RHS HOT 5
- How to enable lunr.js search? HOT 2
- Clicking on a link opens up the page in a new tab. HOT 7
- Left and right navbar panel not scrolling down HOT 3
- Search does not return any results. Reroutes to 127.0.0.1:1313/? HOT 3
- RSS link in header links to ".Permalink" and results in a 404 when clicking
- Removing the button on the RHS of the webpage HOT 1
- navbar menu non-interactive via mobile touch event HOT 1
- The demo is down HOT 1
- Dead links in the readme file HOT 1
- Hamburger menu not working for me on iPhone or iPad HOT 1
- Error: Error building site: failed to process shortcode: HOT 2
- tag support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ace-documentation.