How to change file for Github pages? - html

i need a little help...
Actually i have made a GitHub page but i want to change the file which is being displayed to the website made by me ...
Actually it's a .md file and i made a html file...
Now i want to change the file which is being displayed in the site.
I want to switch from .md to html file which is already in my repo for GitHub pages.
If anyone knows how to deal with it, please help
I'm also adding my github repo link : https://github.com/S2Sofficial/swaroop2sky
And here is the github page link:
https://s2sofficial.github.io/swaroop2sky/

Create index.html file, and it will work as your home page.
OR
simply, change the file name of Welcome to Swaroop2sky _ swaroop2sky.html to index.html.

You can not show your website on GitHub page.
You can include html tags in README to format text.
GitHub does not support html format for README. See answer on StackOverflow about README formats.
GitHub does not support iframe either. See answer on SO about iframe.

Related

How to convert my HTML static site into an editable Github template?

I have my code with the following structure, where I only have a style.css, favicon.png, logo.png, and an external Javascript file in their respective folders.
index.html
assets
CSS
img
I'm looking to convert it to a template on GitHub, where a user can use it and change only the <title> of the head, the main <h1> and <h2> of the body, the logo.png (next to the <h1>) and the favicon.
I have no idea how to do it, as an example, I put this Github project, where using the template just edit .upptimerc.yml to configure your site, and Github Actions makes the deploy in Github Pages every time you modify it. While the source code is in another repository.
If someone could give me something to guide me or give me an example even with a "Hello world" HTML I would appreciate it. I couldn't find anything on the internet beyond the basics.

Github pages: Image shows correctly in markdown, not on website

I am using Github Pages + Jekyll for a blog. I'd love your help!
I just uploaded a post, including an image. After I commit changes I can see the picture properly displayed within the preview, but not in the browser. I also checked on a different browser and on my phone to ensure its not my cache or sth like that.
Code:
How it looks on Github preview:
This is how the image shows on my browser:
I saved the file in the folder images where the .md file is located.
Link to the full code here
Link to the blogpost here
I make PR.
This is raw url.
Please check this.
https://github.com/financenerd/financenerd.github.io/pull/1/files
Jekyll does not copy assets placed in the _posts folder. Therefore your image is missing after build.
You have to put the image in another folder (not starting with an underscore). Like /assets/img/ or /assets/images at the root of your project.
Then in your post, in markdown
![image](/assets/img/ZAK.JPEG)
or
![image]({{site.baseurl}}/assets/img/ZAK.JPEG)
With Github page, you also have this option: https://nhoizey.github.io/jekyll-postfiles/ but I can't speak for experience.

Possible to open/read an .md/.html file automatically in my main HTML for blog site?

I'm trying to create a blog using HTML/CSS. So far, I've created and styled the page and I want to start adding blog posts.
Instead of filling up my HTML document with the blog article in a <p> or <h*something*> tag, I was hoping I can link to a local .md file in a blog-articles folder. That way, I can write the blogs in as .md files, stash them in the folder, and link them into my website.
Is this possible?
edit
I'd basically like to replace the typed out blog post in the main HTML with a link to either a .md or .html file that opens/reads automatically.
https://codepen.io/kremebey/pen/RJdQJp
[I've commented out the part of the HTML where the adjustment would likely occur]
You could use something like: https://github.com/evilstreak/markdown-js which is a great markdown visualizer. Or you could convert it to HTML with this: http://sebastianraschka.com/Articles/2014_markdown_syntax_color.html Hope this helps!

Markdown to html automatically on a site

I know i can convert an MD file to HTML with a bunch of scripts.
I become part of a site which is hosted on github, and it has a place_holder.md file. I can view its content if i isit to place_holder domain. If i change anything in the md file, and i push it to the repo it get updated immediately. If i visit the place_holder.html i can see its content, even that the file is not in the github repo
So my question is:
Does github hoster stuff has an auto md converter which i cannot see? In this case where can i get something like this?
Do webbrowsers understand markdown by default? Then why dont i see place_holder.md in the url?
Thanks
If i visit the place_holder.html i can see its content, even that the file is not in the github repo
Of course you can look at the place_holder.html file it is an html file on your computer that your browser can render so you can view it.
Does github hoster stuff has an auto md converter which i cannot see?
I do not believe github has an "auto md converter".
In this case where can i get something like this?
You can use jekyll to convert your plain text and markdown to static html pages which you can host on the web. You also can get text editors to preview your markdown before you convert it into html which can be helpful. Here is one online text editor.
I'm not sure how you're asking to implement this, but take a look at marked. It's super easy to use and very flexible.

How can I add a downloadable file to my Github.io page?

I have set up my professional website/homepage using Github Pages. I know if this was just HTML being served up from somewhere, my downloadable file would need to be in the directory of my .html file, and then I could reference it in the .html file and link it up. However, since this is served by Github through repository, I am unsure on how to do this.
Do I put my downloadable file in my repo under version control like the rest of the project?
If so, what path do I use in the .html file?
Also, I am aware that the Automatic Page Generator makes it possible to hardly touch the HTML, but it seems pretty restrictive as far as customizing where links and other content appears on your page...
You could just link it normally in your html. Commit it to your repository and have users right click to save.
I just tried this on one of my repositories where I put a link to my CSS file.
style.css
I was able to right click the link and download the file.
If you wanted to create a download from the root you would do:
Download File
I'm pushing my repositories manually instead of using the Automatic Page Generator. The steps are pretty straight forward Creating Project Pages Manually - GitHub Help
Since it is done in GitHub pages. It can also be done like this (in markdown fashion): [download]({{ site.baseurl }}{% link file.txt %}). It has the advantage to work locally without pushing the file to the repo.