I'm not sure if I'm using Gatsby in the right way.
I have downloaded and installed Gatsby following the tutorial here:
https://www.gatsbyjs.org/docs/
Then I have used the Gatsby Dimension starter with the command:
$gatsby new gatsby-starter-dimension https://github.com/ChangoMan/gatsby-starter-dimension
I have edited the Main.js file in src directory and used the commands gatsby build and gatsby serve.
I can see my pages on http://localhost:9000/
But if I open the index.html file in the public folder, I can only see a black page.
Which files I'm supposed to upload to S3 if I want to build a static web site?
thanks
Related
I'm using create-react-app to build a simple React app that utilizes props, however, the images will not load when I deployed the project to github pages, but they load just fine when I deploy the app using the npm start.
When I'm running npm start the images load just fine
But it appears like this in git pages
The images folder is located into the public directory
Then I'm adding the ./images/airbnb-grid.png path for the logo image
Am I doing something wrong in the path for images folder or it's something that im missing that Github pages need to load images?
Github repo: https://github.com/guilhermedkdk/react-mini-clone-airbnb-experiences
Github pages deployment: https://guilhermedkdk.github.io/react-mini-clone-airbnb-experiences/
I've tried different paths for the images folder, such as adding more dots ../images/airbnb-grid.png or completely removing dots /images/airbnb-grid.png
For creating my college webpage using polymer, I have downloaded polymer starter kit 1.0.2. I have customized those html files to my desired text and it runs well when I do the below.
gulp serve
opening well is chrome through
http://localhost:3000/
The problem is, it doesn't show up when I drop files into my college server. The reason for creating a website so that it can be viewed under my name like www.college.edu/~rajesh. We have public_html folder wherein if we put html/css/js files and that is it will accessible public from above URL.
when I copied the contents of app folder along with bower_component folder
the site doesn't come up whereas it work fine locally (using localhost). Only the title gets loaded however there is NO html body visible.
I am totally new to polymer. could this be done? if yes am I missing something.
You have to run gulp serve:dist which will build/vulcanize your site. Then you need to copy app/dist folder
Just a further clarification not sure if you ran this command, according to the readme file when you want to deploy your site you need to run
gulp
which will Build and optimize the current project, ready for deployment. This includes linting as well as vulcanization, image, script, stylesheet and HTML optimization and minification.
All the files needed will then be located in the 'dist' folder.
Build and Vulcanize polymer starter kit github README.md
I'm pretty sure it's not possible but does anyone know of a configuration that can localize the exported files in Jekyll so that the _site content can run independent of a web host?
I want to use Jekyll to develop a site, and deliver the contents of the _site folder for hosting, but I will not have the hosting information ahead of time. So I would like to be able to run the index.html file in the _site folder directly from the Desktop and have the site work properly. That way I can deliver the files and the site will run using relative paths/links regardless of where the files end up being hosted.
This possible but you need to know where your generated site will be located on the filesystem. This, because of the relative links pointing to resources (js, css, images).
For example a site generated at /home/user/www/_site, index page will be serve in your brower at file:///home/user/www/_site/index.html, so you'll have to set baseurl in _config.yml to baseurl: /home/user/www/_site in order to have you site working.
On windows it can be baseurl: /C:/Users/New/www/_site
I am trying to use a github api to generate content in my jekyll project. Currently I can generate the desired content using the .json file locally in the _data directory. However, I want to be able to use the .json file from github every time the site is built to update the content in the project without having to manually re-download the file and place it in the project directory. Is this possible and how can this be done? Also the project is being hosted by github pages so my plugin usage is limited.
I am using Hugo http://hugo.spf13.com/overview/introduction to render a folder with html/css/js files as localhost in my laptop.
I have html files in /content and all js/css/img files in /static folder
This is content in config.toml
baseurl = "http://localhost"
contentdir = "content"
languageCode = "en-us"
title = "my new hugo site"
I did hugo server and it rendered /public folder just fine. But all .html files now turning into .xml files and I cannot open them in browser like http://localhost:1313/index.html or so.
What did I do wrong?
Did you setup a theme yet? Without a theme, Hugo will render files as XML, if you read the documentation on themes, that should give you what you need.
First you have to clone themes from github.com/spf13/hugoThemes
In my case I did'nt have git install in my test machine here are the things that I did:
1) Download theme from github.com/spf13/hugoThemes
2) Extract theme to /path/themes
3) Run hugo --theme='themename'