Having html and wordpress on the same directory - html

I have a WordPress site with a couple of posts on it. To this site I need to add a few HTML pages (including index.html). I need both of them to work properly.
The home page should be the index.html page, and all its links(HTML pages).
The previous site URL's i.e. WordPress URL's should also work.
I put them together and the index.html page displays as home page, the subpages(HTML) also work fine. Although all WordPress URL's are re-directing to the index.html itself.
Is this possible? How do I make the old WordPress URL's work fine (i.e. not redirect the index.html page)?

When dealing with issues like this, I like to create page templates in Wordpress (with page names like About, Projects, etc.) And then I create a .php file using the slug title of it (so a projects page will correspond to a .php file called 'page-projects.php'
One example being I make a page called 'about', then I create 'page-about.php' in my Wordpress directory. The Wordpress Template Hierarchy will, along the way, look for a .php file called 'page-about.php'
A solution like this is great because those pages are linked through your site, so using /about or /projects will bring you to the proper pages instead of redirecting to the main page (because it redirects to your index when Wordpress can't find any other suitable template to display)

Related

how to configure jekyll with netlify cms to edit & create pages

I have a simple jekyll site and am trying to get netlify cms to work as the editor for the pages aswell as the posts.
If I tryt o move the pages into a pages folder in the the custom collections folder then it doesn't seem to build them unless they have an .md extension but the pages have plenty fo custom html in them and using .md appears to render the html on the page as text not html.
If I leave the pages in the root then netlify cms doesn't pick them up however I configure it.
There are 3 main kinds of page, Home page, a second level gateway type page, content pages
and then blog posts.
How should I configure this so that netlify can edit my pages and users can create new pages?
Site is here:
https://github.com/tofuwarrior/sites-clearspringacupuncture
Thanks.
Netlify CMS is a great system. However, if you want a WordPress-like experience that is also very forgiving for the developer, I recommend CloudCannon. This is a paid CMS, but it supports visual editing, which means any static page with <div class='editable'></div> can be edited within their system. It also supports image resizing. Creating new pages in CloudCannon is as simple as cloning old ones and renaming them. It is absolutely worth checking out.
Back to your question... It seems like you wrote 'page' instead of 'pages' in your config.yml file. Here is a working config file for Netlify, in which you can see that the correct name is 'pages'.
PS. I noticed you have a 'customcollections' folder. This seems odd to me. Aren't all collections custom collections in Jekyll?

Default localized index.html for pelican

I tried to find something that is similar to my problem, but I did not have success.
I'm using pelican to build a static multilanguage website and I'll use github pages to publish the content.
Being a multilanguage site (en as default) I decided to structure the output folder with separated folder for each language and use relative url to point to templates etc.. all works smoothly enough.
Just to make a first github page publish experience I used ghp-import and again all is working properly except for one little thing.
Also in localhost:8000 the default homepage, all the other pages, etc have the language tag in the url, like:
localhost:8000/en/blog
localhost:8000/it/blog
the problem is that the default homepage is:
localhost:8000 (for localhost obviously)
username.github.io (for github pages)
by landing on this page, the templates fails to load (again they are lang specific) and ever worst, all the link are broken because they do not point to any language (localhost:8000/blog does not exist)
What I would like to do is to make a redirection so that, when typing username.github.io will redirect to username.github.io/en
I did not find something suitable in the pelicanconf.py file..
is it possible?
Thanks!
Try changing your SITEURL in pelicanconf to 'username.github.io/en'
That should work but the address 'username.github.io' won't work anymore.

Setting Up A Html Page On A Server

I am trying to learn how to set up a html page on a server, which i have done but an index page appears, I do not want this page to appear i would rather my home page to appear.
I am only learning how to do this so i have used a free web host.
web address: http://testingmyfreewebsite.comxa.com/
My file manager looks like this
The subPages and Css folders were created by me and they contain the css and other pages to my website.
i would really like to know how to remove the index page i am open to many methods.
There are three commonly used default page names that you can use on most web servers:
index.html
index.htm
default.htm (on some Windows servers)
It's a good idea to stick with index.html or index.htm on most servers, as default.htm is most often used on Windows servers, and isn't as common as it used to be.
If you're going to put other pages inside of folders (or directories) each folder should have an index.html inside of it as well if you're relying on the url to direct the user instead of hard coding it in.

Sitemap - Wordpress site on subdomain

I'm trying to get a definite answer regarding the issue. I have an html website which contains a WordPress blog under it in a subdomain as a folder.
I currently have site map on both the html site and the blog itself. Is that the way to go ? I have also noticed that the sitemap on the html site doesn't include any of my pages/posts from the blog, should it include them as well?
Having two sitemaps for the root and subdomain is perfectly fine and acceptable. Don't forget to submit them to search engines, or include them in your robots.txt file if you have one.
As the methode said, this is perfectly fine and acceptable. All you have to do is just add the in your robots.txt file so that search engines can crawl your html site as well as blog.
First of all create a new robots.txt (if not created earlier) in root / home /www foler of your website and add the following two lines by replacing them with your site related values
sitemap: http://<www.yoursite.com>/<path_to_your_html_sitemap>.xml
sitemap: http://<www.yoursite.com>/<path_to_your_blog_sitemap>.xml

Static HTML page that links to current Wordpress blog

So, I currently have a WP blog installed. What I want to do is put a static HTML landing page at the root of the site and then a link to the blog. The HTML landing page does not look similar in theme and everything is hosted under the same domain.
How can I do this with this current structure?
I suppose I would have to somehow move the blog to /blog instead of the root?
Thanks.
Depending on what server you're running, you might not need to do anything. Certain servers, like Apache, have a DirectoryIndex which gives priority to .html files by default. So even if you had index.html and index.php in the same folder, it would load the index.html file.
You could also define the priority in an htaccess file or use the commenter above's suggestion of pasting the HTML into the index.php template and then making a "home" template and telling Wordpress to use that specific page as the homepage.
That being said, I would strongly recommend installing Wordpress in a sub-directory, such as "/blog" as you mentioned. Just as a fail-safe.