i have my own github pages.
username.github.io
i know if github pages can having 1 pages like username.github.io/pages1, but is there any way to make MULTIPLE pages like this?
username.github.io/pages/1
username.github.io/pages/2
Yes, and it is the same way.
To creates the URL /pages1 you create a directory called /pages1 and put an index.html file inside it.
To create the URL /pages/1 you create a directory called /pages and put a directory called 1 inside it and then put an index.html file inside that.
… and you can put a directory called 2 next to the directory called 1.
Related
I'd like to change the page that shows what files I've uploaded. I never found the editable file. Can it be changed at all?? I have read a bunch article about this problem but I haven't found the solution.
I am talking about this page: Index of /--
Here is my shared folder: Location
Change the index file (probably: index.html or index.php) or add one yourself, if it does not exist yet. You can use .htaccess for example, if the directory or files inside should be access protected. You can also redirect the user when he is accessing the directory or a file inside.
The images that you have provided show the fallback display of a directory for apache.
My website files structure is as follows: a folder for pictures, and a folder containing all my html/css files.
Now that I am trying to deploy my website for the first time (I'm using FireBase), it seems that I need an index.html in my public folder's root.
However, all my html/css files are in a folder, and my pictures in another. In order to pull out my home page and rename it to index.html, I would have to change the path & name of all the files that reference it as well (which is every file). Is there any way I can avoid this?
Thanks.
(My IDE is VSCode)
All content needs to be under a single folder, which is the one you then indicate in the public option in the firebase.json configuration file.
It is totally fine to have the HTML/CSS in one subfolder under there, and the images in another subfolder. But the entire public folder will be deployed, so you'll want to make sure you have no other files in there.
So this is fine:
public
html_and_css
index.html
main.css
images
image1.jpg
image2.jpg
image3.jpg
But here you can't just deploy all of src, as that would also deploy the code subfolder that contains secrete:
src
code
secrets_that_should_not_be_published
public
index.html
main.css
images
image1.jpg
image2.jpg
image3.jpg
If you have this last structure, you can tell Firebase to not deploy the code directory by specifying it in the ignore option in the firebase.json configuration file.
I have written a post and would like to provide a file as attachment for download.
So far I have
created a link [Download files][download-file]
declared the link as [download-file]: download.zip
put download.zip in the _posts folder
However, the file does not get copied to the correct location.
I have
read about data files
read about directory structure
read about static files, which IMHO was the closest hit. Unfortunately, no example is provided.
So neither page gave me an answer on how to provide files for download.
I don't know where to put static files in the directory structure. Once I knew that, it seems I could use some Liquid like {{ site.static_files }}, but even then I'd still need to specify a file name.
Here is my solution. I have a "myname".github.io, I created a folder /download inside the myname.github.io and inside this download folder I uploaded the files I want to include in my posts.
In the single post then I created the following code:
some text and [here is possible to download the file in PDF][1]
[1]:{{ site.url }}/download/file.pdf
You can place your download.zip file in the root of your project, and it will get copied over to {{ site.url }}/download.zip. If you'd like it contained in a folder, you can create any folder, eg download/, and any file will be able to accessed via {{ site.url }}/download/*.
Every other directory and file except for [the Jekyll files]—such as css and images folders, favicon.ico files, and so forth—will be copied verbatim to the generated site.
from the Jekyll Docs
For controller_A's views, I currently use $this->element('repeatedly_used_html'); in the element folder for some .ctp files that are used more than once. However, some of the files in the element folder are entirely used for one controller, and the file are unorganized in the element folder.
So, for exmaple, controller_A has views that use files from the element folder. I would like these .ctp files for controller A's views to be contained in the app/views/A.. is there way to invoke a call similar to $this->element('repeatedly_used_html'); that will allow me to keep files the folder app/views/controller_A? I would like to avoid writing a very long .ctp file.
It looks like you're using CakePHP 1.3 based on your directory structure. If this is the case, you can do this by simply using the render() method instead of element(). This will render a template using the current view path (in this case, the controller you're in).
echo $this->render('repeatedly_used_html', false);
The second parameter is the layout, which we set to false to make sure the whole layout isn't rendered along with the view.
echo $this->element( 'subfoldername/viewfile' );
Then create the subfoldername directory in your elements folder.
I have a _posts folder and I just want a simple way to separate the posts in the folder into two different folders, and not have any permalink changes, for purely organizational reasons.
Just create subdirectories in your _posts directory; the subdirectories will be ignored when Jekyll generates permalinks.
I recently did this to my _posts folder because I have over 200 files. I decided to create folders that represent each year I have a posts for. Doing this though, broke post_url. The error is something like as follows when you run jekyll build
Liquid Exception: Could not find post "blah-blah" in tag 'post_url'. Make sure the post exists and the name is correct. in _posts/2007/blah-blah.md
I had to go back in and where ever I used post_url, I had to add /year/ in front of each post url links.
https://github.com/jekyll/jekyll/issues/1714#issuecomment-28167702