Open Genarito opened 4 years ago
Even creating an orphan branch with git branch --orphan gh-pages
, removing everything except dist/site
folder and putting its content at the root project, It doesn't work. You can see here. It fails on loading Presidium and links don't work either.
Hey there.
Gonna run through the steps to reproduce, and see if I can find out where the issue is...
Cool! Thank you so much! I've updated the presidium-core
dependency to its latest version (0.1.46) and re-run npm run gh-pages
with the same result.
Hey there.
Looks like there's been a change in gh-pages, so we will update presidium to accommodate. In the meantime, to get my test working, I used the orphan approach. There's nice instructions here:
If you follow the above instructions, replace hugo
, with npm run build
, replace the public
folder with dist/site
, and their upstream
remote, replace with origin
(Which I'm assuming is your github remote).
In short, the rendered site lives in dist/site
, and you pointing gh-pages to that folder.
As soon as we have a permanent fix to our gh-pages deploy script, we'll push up and bump up the version.
Also remember, you'll have to change your baseurl in _config.yml to reflect the github pages path, so /username/project/
.
Let me know if you need any other assistance in the meantime.
Trav
@ruaanvds I added you to this thread, will ping you in the morning on status update.
Ok! I'll try! I realised that when you use the template https://github.com/SPANDigital/presidium-template.git the command gh-pages
fails on putting the .versions
content on the target branch and occurs the README.md content problem. But with https://github.com/SPANDigital/presidium-template-design.git there is not such problem, the script problem happenes instead as the steps in my original question show. So there are 2 problems here, each of them with differents templates.
Hope It helps
Alternative solution to gh-pages is to publish public docs to a /docs directory which is simpler than another branch:
"gh-pages": "rm -fr docs/;mkdir docs;npm run clean;npm run build;cp -r dist/site/ docs/"
See: https://github.com/jware-solutions/geophp-documentation/pull/4 (Your baseurl was not set) Sample: https://pacomendes.github.io/geophp-documentation/
Good point @pacomendes , fairly easy for us to change the deploy dir... Much easier than an orphaned branch on dist/site... Just the rendered files in doc/
Thank you really much @pacomendes ! That worked like a charm! I had to remove the mkdir docs
part in command because it was creating a site
folder when the cp -r /dist/site docs/
was executed.
It would be very cool to change the default behaviour as @torabisu proposed since we don't need to create another branch to make things work.
Thank you again, for the solution, and for this framewok!
Hi, I've cloned this template repository. I've added my custom documentation content. Now I'm trying to deploy my repo running
npm run gh-pages
, but when I open my github page It's showing the README.md file's content.I'm looking your User documentation repository and I see that on your branch
gh-pages
you only have thedist
folder content. It's an error of thegh-page
command or I should push thedist
content on mygh-pages
banch? The command is pushing all my current branch content to that branch, so I don't understand how It could work.When I do a clean example it puts the
.versions
content folder ingh-pages
branch, but the styles and Scripts seems to be not working.Steps to reproduce the last problem:
Here you can appreciate the result. You can check the code here.
Thanks in advance and sorry about my English.