Add Your Demo Content On GitHub Pages

0 views
Skip to first unread message
Message has been deleted

Emmanuelle Riker

unread,
Jul 8, 2024, 2:30:26 PM7/8/24
to guicritmyli

I understand the process to publish html content from code hosted at github via this link -
I am just curious to know how can I show a .php page as a demo, similar to what is done in blueimp above.

Add Your Demo Content On GitHub Pages


DOWNLOAD https://tweeat.com/2yWkJB



Github Pages let you serve web client content (HTML, Javascript, CSS) without the need of owning and maintaining a web server. You can make sub folders, map your domain into it. Use tools such as Jekyll or Hugo with some basic programming skills, you can make your site work as good as an CMS.

To publish a user site, you must create a repository owned by your personal account that's named .github.io. To publish an organization site, you must create a repository owned by an organization that's named .github.io. Unless you're using a custom domain, user and organization sites are available at http(s)://.github.io or http(s)://.github.io.

GitHub Pages sites created after June 15, 2016, and using github.io domains are served over HTTPS. If you created your site before June 15, 2016, you can enable HTTPS support for traffic to your site. For more information, see "Securing your GitHub Pages site with HTTPS."

In addition, your use of GitHub Pages is subject to the GitHub Terms of Service, including the restrictions on get-rich-quick schemes, sexually obscene content, and violent or threatening content or activity.

If your site exceeds these usage quotas, we may not be able to serve your site, or you may receive a polite email from GitHub Support suggesting strategies for reducing your site's impact on our servers, including putting a third-party content distribution network (CDN) in front of your site, making use of other GitHub features such as releases, or moving to a different hosting service that might better fit your needs.

In this demo, we are using the gh-pages branch to publish the website. You can use other sources if you find them more appropriate. For example, I am publishing the web version of this GitHub-Pages-Demo repository using the master branch, and GitHub renders this README.md file and show it as a web page.

Alternatively, you can use the JupyterLite demo using xeus-python to publish a deployment on Github pages that uses xeus-python by default and allows to pre-install packages using emscripten-forge and conda-forge.

You can add and update the default notebooks and files by clicking on the contentsdirectory and dragging notebooks from your desktop onto the contents listing. Wait forthe files to be uploaded and then save them (commit them) to the main branch of therepository.

gh-pages gets around the subfolder situation by moving your publish files to a separate branch, which then allows you to point your Github Pages source at the /(root) for that branch, without disrupting your main branch.

Go ahead and push everything up, if you haven't already, and deploy. Check in Github to make sure that the gh-pages branch update! Now, when you return to the Github Pages settings, you should be able to select gh-pages as your source branch.

My understanding is that this is the difference between a user / organization page and a project page. You can have as many project pages as you like, but only one user / organization page:
docs.github.com/en/pages/getting-s...

Astro maintains the official withastro/action to deploy your project with very little configuration. Follow the instructions below to deploy your Astro site to GitHub pages, and see the package README if you need more information.

These lines use content delivery network (CDN) URLs to serve the CSS and JavaScript scripts to transform the site into a Docsify site. As long as you include these lines, you can turn your regular GitHub page into a Docsify page.

Then enter the new folder named yourusername.github.io with cd and ls. You should see the .git folder, which contains the configuration and metadata of your project, as well as the README.md file if you created one.

Whilst this server is running you can update your site; you will find some useful variables to edit in _config.yml. To add a new post or edit the existing demo, simply add a new markdown file in the _posts directory.

Follow the wizard started by the extension to give your app a name, choose a framework preset, and designate the app root (usually /) and built file location /dist. The wizard will run and will create a GitHub action in your repo in a .github folder.

Before attempting to publish you should ensure that the Source branch for your repository is gh-pages and that the site directory is set to the repository root (/). You can modify these options in Settings : Pages for your repository. For example, if you already have a gh-pages branch:

Once you have configured the source branch and updated your .gitignore, navigate to the directory where your project / git repository is located, make sure you are not on the gh-pages branch, and execute the quarto publish command for GitHub Pages:

The publish command will confirm that you want to publish, render your content, copy the output to a special gh-pages branch, push that branch to GitHub, and then open a browser to view your site once it is deployed.

Using the quarto publish gh-pages command to publish locally rendered content is the most simple and straightforward way to publish. Another option is to use GitHub Actions to render and publish your site (you might prefer this if you want execution and/or rendering to be automatically triggered from commits).

This action will run whenever you push to the main branch of your repository. It will also run when you manually trigger the action from the Actions tab of your repository. The action will render your content and publish it to GitHub Pages, thus you need to ensure that GitHub Actions has permission to write to your repository. This is done by checking the Read and write permissions box under Workflow permissions in the Actions section of your repository Settings.

Using GitHub Actions you can automate the deployment of your project documentation. At the root of your repository, create a new GitHub Actions workflow, e.g. .github/workflows/ci.yml, and copy and paste the following contents:

This will build your documentation and deploy it to a branch gh-pages in your repository. See this overview in the MkDocs documentation for more information. For a description of the arguments, see the documentation for the command.

If you're hosting your code on GitLab, deploying to GitLab Pages can be done by using the GitLab CI task runner. At the root of your repository, create a task definition named .gitlab-ci.yml and copy and paste the following contents:

There are two ways to integrate external data with a Jekyll website. The first is by using third-party services and APIs. For example, Disqus allows you to embed dynamic content on your static website via its external service.

The two standard document types in Jekyll are posts (for blog content) and pages (for static pages). The launch of Jekyll 2.0 brought collections, which allow you to define your own document types. For example, you could use a collection to define a photo album, book or portfolio.

In order to make GitHub Pages accessible to a wider audience, this guide focuses on using the web interface on github.com to build your personal website, thereby generalizing and glossing over the standard tools associated with Git and GitHub. To get a lot dirtier with Git and GitHub (ie, the command line and terminal), there are several other great guides you should also know about, probably bookmark, and read after completing this one, or jump over to if that is more your speed: Anna Debenham, Thinkful, and even GitHub itself go above and beyond making the command line or local workflow of GitHub hosting and Jekyll templates accessible to a wider audience.

Jekyll is a very powerful static site generator. In some senses, it is a throwback to the days of static HTML before databases were used to store website content. For simple sites without complex architectures, like a personal website, this is a huge plus. When used alongside GitHub, Jekyll will automatically re-generate all the HTML pages for your website each time you commit a file.

Jekyll makes managing your website easier because it depends on templates. Templates (or layouts in Jekyll nomenclature) are your best friend when using a static site generator. Instead of repeating the same navigation markup on every page I create, which I'd have to edit on every page if I add, remove, or change the location of navigation item, I can create what Jekyll calls a layout that gets used on all my pages. In this tutorial, we're going to create two Jekyll templates to help power your website.

Notice the plain text at the top of the file. Jekyll calls this the Front-matter. Any file on your site that contains this will be processed by Jekyll. Every time you commit a file that specifies layout: default at the top, Jekyll will magically generate the full HTML document by replacing {{ content }} in _layouts/default.html with the contents of the committed file. Awesome!

12 Make a _posts/ directory where we'll store our blog posts. Inside that folder will be our first post. Jekyll is very strict with how these files are named, so pay attention. It must follow the convention YYYY-MM-DD-title-of-my-post.md. This file name gets translated into the permalink for the blog post. So in this example, we'll create a file named 2014-04-30-hank-quinlan-site-launched.md:---layout: posttitle: "Hank Quinlan, Horrible Cop, Launches Site"date: 2014-04-30---Well. Finally got around to putting this old website together. Neat thing about it - powered by [Jekyll]( ; and I can use Markdown to author my posts. It actually is a lot easier than I thought it was going to be.Note the file extension .md stands for Markdown, and the Markdown syntax used inside the file gets converted to HTML by Jekyll. Like Wikitext, Markdown is a markup language with a syntax closer to plain text. The idea of Markdown is to get out of the author's way so they can write their HTML content quickly, making Markdown very suitable as a blog authoring syntax. If you aren't already, you'll want to get familiar with Markdown syntax, and this printable cheatsheet (PDF) will be your best friend.

aa06259810
Reply all
Reply to author
Forward
0 new messages