Github Pages will not recognise json file - json

I'm quite new to software development, and have only uploaded student projects to GitHub Pages and Heroku previously.
I'm currently working on a commercial project for a friend's band, and thought I'd upload it to GitHub Pages first, and the once we were happy, we could upload it to the webhosting service they have chosen.
The page includes a repertoire section, which is populated from a JSON file. I can import the data fine locally, but it doesn't appear on the live GitHub Pages site.
I think it's because in order to import the file, GitHub thinks I'm using an absolute path.
import data from "/assets/csv/carnaby-repertoire.json" assert { type: "json" };
However, when I remove the first '/' it doesn't work locally, or live.
Here is a screenshot of my folder structure:
Will I have the same problem with other webhosts, or is this just a GitHub thing? I would be really grateful for any advice. Thanks so much!

Related

How to deploy cesium-starter-app in Flask

I have a small web project running on a python flask microframework.
I have several .html pages working in the flask server with the #app.route method
#app.route('/')
def home():
return render_template('home.html')
and I want to be able to visualize a cesium-starter-app index.html as one of them to use it as a visualizer of some properties, i.e. position of a spacecraft.
To test if the server allows the cesium app to be displayed I have replaced one of the .html files of my web project with the index.html one provided in the project https://github.com/pjcozzi/cesium-starter-app and updated the browser but the page is blank.
I also copied the Source and ThirdParty folders and the server.js file to the same directory where the .html is located to see if this do the trick but it doesnt work.
Could you please advice me on how to proper deploy the cesium-starter-app (or any other cesium implementation that works) inside a Flask web?
Thanks in advance!

WordPress generated files edited with HTML

After basic knowledge of HTML/CSS/JS and Jquery, I got myself into WordPress. In order to save time and not build things from zero, I would use pre-made templates, and modify them according to the built of the desired future webpage. There might be a huge misconception in my head, but so far I havent found reply for this solution.
I have a locally running WordPress webpage with the help of WAMP. My webpage would consist 3 separate HTML files, lets say "index.html, contact.html, about.html". My issue is that after generating those pages in WordPress, I dont find any way to modify the HTML file of those sites. Nor locally in my computer, nor in the surface of WordPress. I found the "editor" function in WP, but apparently it lets me to edit only the CSS file.
My main goal is to generate the file with a template, than import it to BRACKETS / ATOM / etc and custom-shape the HTML and CSS on it. What am I missing ?
Thanks,
Wordpress only has templates it uses according to the type of content (page, blog post or any other custom post type you define in the theme) requested. All your actual data is stored in the mysql database. This data is retrieved and inserted into the template and then the generated file is sent to the client. So, you wont find any .html files in the wordpress core. My suggestion is to view the source in the browser, copy, paste and edit in your favourite editor.
I think you are using HTML files as a template which are not dynamically converted into wordpress theme. that's why you can't edit these files. You need to follow these steps.
1. your index file must be in index.php not index.html
2. style.css file with valid codes and most important thing is you need to know wordpress theme development. https://developer.wordpress.org/themes/basics/template-files/ This will help you

How to upload sigmajs gephi export files to a server? [javascript files w/ css and index.html that I need to point to]

I'm trying to upload my sigmajs export from gephi to a website, my GitHub pages, but I'm having trouble uploading them.
Can somebody explain what to do? I uploaded the folder and tried to point it to index.html, but my graph does not show up.
You need to create a repo called accountname.github.io and push all the files there. Substitute accountname above with your GitHub username

Include Readme.md in HTML file

I have a static HTML page which I am hosting on a personal server. I have a README.md file which I am storing in a public GH repo. I'd like to automatically include the contents of the ReadMe on my local html page.
Basically, I want to be able to update the Readme file in the project repo and have updated instructions automatically displayed on the project website.
Any thoughts?
Thanks
I think you might need more than just HTML for that. Perhaps look into using ajax to request your external resource and insert it into your page...

How to pull local XML configuration data into HTML file

I'm working on a web project that fetches data (using Ruby) and then displays the data on a dashboard of widgets (designed in HTML/SCSS, linked via CoffeeScript).
I have a local configuration file that I would like to be accessible by both the Ruby scripts and the HTML. I managed to get the Ruby side of things working with XmlConfigFile but can't seem to find a similar solution for the HTML.
Everything I've found so far involves xmlhttp.open("GET", <link>, false), which would be great if this weren't a local file.
Any help is appreciated. Thanks!