在React中编码的网站,在GitHub Pages上显示空白页面 [英] Site coded in React, displaying blank page on GitHub Pages

查看:72
本文介绍了在React中编码的网站,在GitHub Pages上显示空白页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从朋友那里收到了代码,可以用作我的投资组合网站的模板.该网站使用javascript,react,html和css编码.

I have received code from a friend to be able to use as a template for my portfolio website. The website is coded in javascript, react, html and css.

我将代码上传到GitHub上的存储库中,以查看其外观.我已经将网站发布在ruben-olmos.github.io.但是,导航到网站地址后,我看到的只是标签和空白页中的元数据.似乎已读取index.html文件,但其余未读取.我认为这可能与它是用javascript编码的事实有关.

I uploaded the code to a repository on GitHub to see what it looks like. I have published the website at ruben-olmos.github.io. However upon navigating to the website address all I see is the meta data in the tab and a blank page. It seems that the index.html file is read but the rest is not. I think this might have to do with the fact that it was coded in javascript.

该网站的代码似乎未读取代码的javascript部分.我已经遍历了代码,并且代码看起来一切都很好.这是到资源库的链接. https://github.com/ruben-olmos/ruben-olmos.github.io .

The javascript portion of the code does not seem to be read by the site. I have gone through the code and everything seems to be fine with the code. Here is a link to the repository. https://github.com/ruben-olmos/ruben-olmos.github.io.

我以前已经启动过网站,但是他们没有给我这个问题.有什么想法吗?

I have previously launched websites but they have not given me this problem. Any ideas?

推荐答案

您的朋友可能对您没有很大的帮助.

Your friend may not have done you a great favor.

反应代码不可立即上传;它必须由包装系统(例如webpack或包裹)进行处理,在该系统中,javascript代码创建HTML/CSS,然后将其呈现到网页上.通常,它与GIT(代码版本控制)系统结合使用.

React code is not immediately uploadable; it must be processed by a packaging system (like webpack or parcel) where the javascript code creates the HTML/CSS that is then rendered onto the web page. Usually, it is used in tandem with a GIT (code versioning) system.

React(顾名思义)的优点在于,该编码系统(用于协作(组/团队)编码)可以快速有效地对网页上多个位置出现的多个数据流做出反应.缺点是它不是您祖母的html/css/js Notepad ++编码模板.学习反应不是基本的-需要时间和精力.

The advantage of React (as the name suggests) is that this coding system (intended for collaborative (group/team) coding) can react quickly and efficiently to multiple streams of data happening in multiple places on a web page. The disadvantage is that it is not your grandmother's html/css/js Notepad++ coding template. Learning react is not rudimentary - it takes time and effort.

如果您希望成为一名专业开发人员并希望学习当前使用的最热门,最先进的开发系统之一,则一定要深入研究React或Angular或Vue等.快速学习,或者在几个小时或几天内建立一个不错的投资组合网站(当然,除非您有一个React专家坐在您旁边并指导您完成学习过程).

If you are looking to become a professional developer and wish to study one of the hottest, most advanced development systems currently in use, by all means dig into React or Angular or Vue or etc. But don't expect it to be a quick study, or to have a great portfolio website in a few hours or days (unless, of course, you have a React adept sitting beside you and guiding you through the learning process).

但是,如果您想要一个快速,免费的网站模板,我建议您看一下W3Schools上更为简单的Bootstrap模板.公司主题教程大约需要20分钟才能完成,而需要花一两个小时进行自定义最终产品.

But if you want a quick, free, website template, may I suggest that you look at the much simpler Bootstrap templates on W3Schools. The Company Theme tutorial takes about 20 minutes to complete and an hour or two to customize into a final product.

相比之下,您可以花很多天(很多天)来学习React.

By contrast, you could spend many days (MANY days) learning React.

这是一篇文章,可以帮助您了解一些要跳入React之前要复习的javascript概念:

Here is an article that may help you understand some of the javascript concepts to brush-up on before jumping into React:

https://blog.logrocket.com/javascript-concepts-学习前反应/

这篇关于在React中编码的网站,在GitHub Pages上显示空白页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆