href's for a github pages project - github-pages

I have a github pages svelte app based on myuser.github.io - it works.
I have also created a github pages based on a project (sveltekit) so the url is myuser.github.io/sveltekit. The repo is set so that github pages is served from gh-pages and root. This only sorts of works(!)
The problem is navigation. Here is the navigation code in __layout.svelte
<nav>
Home
About
Settings
</nav>
But when I run this under github Pages, the home page comes up but the other links show as myuser/github.io/about which will give a 404.
if the code is
<nav>
Home
About
Settings
</nav>
then other links work once and are then eg myuser.github.io/about/settings which is, once again, a 404.
So though github pages allows me to have sub repos under the top level, navigation for these is based on root of the top level rather than root being defined as the root of that repo. And the only options are root and /docs.
Is there a way of setting root to /sveltekit/ ?
Another problem is that styling is displaying on github pages though does when the site is run under preview or dev.

I made two changes
svelte.config.js in kit
paths: {
base: '/sveltekit',
assets: '/sveltekit'
},
and in __layout.svelte
<script>
import { base } from '$app/paths';
</script>
<nav>
Home
About
Settings
</nav>
And now navigation works and I also get styling.

Related

Hugo Site hosted in GitHub Pages. Main page shows ok but the Blog goes to 404

I have a site hosted on GitHub Pages:
https://mcbridebr.github.io/mysite-hugo/
I have it setup to publish to pages from the docs/ directory in the master branch. When I run hugo it will publish to docs/.
I can bring up the home page just fine. But when I click on Blog it goes to 404. I have a blog post that is blank under content/post/. If I run this locally and access it with localhost:1313 the BLOG link works. I am not sure what is happening here, any advice would be greatly appreciated.
Source Repo: https://github.com/mcbridebr/mysite-hugo
I had to go back and add additional layout index.html files to accommodate for the blog section.

github pages remote theme not working

I have created a repository level github page in the root directory of my project. This works fine, and after a small build interval, the index.html page is served as expected at https://erikor.github.io/myrepo/
Now I am trying to use the dyutibarma/monochrome theme.
Per this post, I, somewhat naively, thought that all I needed to do was to put this in my _config.yml:
remote_theme: dyutibarma/monochrome
But the resulting page clearly expects some theme related resources to be in my repo, not the remote theme repo. For example:
<link rel="stylesheet" href="/myrepo/css/main.css">
And thus, my page is not styled properly.
Is there a way to point github pages to the remote theme resources, or is the only way to accomplish this to fork the theme, build it, and then add my content? I was hoping to avoid that every time I want to switch themes if possible, particularly after reading the above referenced post about remote themes.
Thanks in advance,
Eric
The dyutibarma/monochrome theme is not jekyll-remote-theme compatible. For example: it has the "css", "img", "js" folder in it's root directory. Those folders will not be deployed when used via remote_theme. They must be moved within an assets folder in order to be deployed. I just created a PR for an other theme to be jekyll-remote-theme compatible and published a working demo on github.
Never fork a theme! A GitHub fork can not be changed later. So when you want to change the theme later on the fork will always point on your first theme. When the theme is not jekyll-remote-theme compatible just clone it and push it as a self-standing repository. Add the theme base repository as upstream to fetch bugfixes and new features. I have written a blog post about this.
BR

Add an App not showing publishing feature list and libraries for a custom master page

Add an App not showing the publishing feature list and libraries for a custom master page created. Checked out with the site settings for the publishing feature activation as well
Add the below code to your Master Page after the div: <div class="ms-breadcrumb-top"> but inside <div class="ms-breadcrumb-box ms-tableCell ms-verticalAlignTop"> as follows:

Sitecore Multi-Site: Prevent page in one site from appearing on another

I've inherited the maintenance of a multi-site instance of Sitecore (v6.5) that we're starting to see some cross-talk of pages. The content is structured as follows:
/sitecore
/content
/Site1
/Metadata
/Nav
/archived pages
/archived page1
/Home Page
/Internal Page1
...
/Site2
/Metadata
/Nav
/archived pages
/Home PAge
/InternalPages
...
For this example, site definitions are patched in such that www.site1.com has a rootPath of /sitecore/content/ and a home item Site1/Home page, www.site2.com has a similar rootPath of /sitecore/content/ and a home item Site2/Home page.
The content owners will move pages out from under the "Home Page" node to a folder called "archived pages" when they don't want them on the site anymore.
What I'm curious is if there is a way to prevent the following URL:
http://www.site2.com/sitecore/content/Site1/Metadata/archived1pages/archived-page1
Rendering.SiteResolving is currently set to true, so neither site should be producing links like this, but I'd like a way to have this sort of URL return a 404 without having to resort to writing a custom pipeline component. Am I missing a simple configuration to prevent this?
Try this, make "archived pages" folder item "un-publishable" on all sites, do a publish site (smart publish), now all of archived pages are not on web database, because the parent folder is not publishable, and you should see a 404 page when hit this URL:
http://www.site2.com/sitecore/content/Site1/Metadata/archived1pages/archived-page1

Creating an ember application off a path

I've been working with Ember (RC1) a bit - and I can create apps that load from the root of a website (foo.com/), but now I'm trying to delay loading an app until I hit a given path within my website (foo.com/app), as opposed to loading it at the root.
That "app" page is served up from the server with a div that ties to my router's root element. The root of my app should display my applicationView and related template.
I think I'm doing everything correctly, and am not getting errors, but the only thing I see within the div where I expect my app to show is:
<div id="ember247" class="ember-view"></div>
At this point, my template should only show some raw html, but i'm getting nothing! Anyone have any ideas?