I cannot figure out why I am getting a 404 error at http://rachaelsalter.github.io
I am using Middleman and the middleman-deploy gem. Everything seemed to work fine with the deploy and I have an index.html file.
Any help would be very much appreciated.
You're pushing to a user repository (userName.github.io), so you need to deploy your generated code to master branch. See github pages documentation.
In your config.rb file, you must change deploy.branch variable witch is gh-pages by default, to master
activate :deploy do |deploy|
deploy.method = :git
deploy.branch = 'master'
# ... other deploy setup
end
If you're versioning your sources, you will have to move them to another branch like sources.
Related
I was trying to build a website for my R package using pkgdown R package. FYI, I am not using <username>.github.io.
Following the instrucution (https://pkgdown.r-lib.org/articles/pkgdown.html#publishing), I ran
usethis::use_pkgdown_github_pages()
I have created 'docs' folder and html files in my master branch and an empty 'gh-pages' branch. When I checked locally built pages using pkgdown::build_site(), it works perfect.
However, when I open <username>.github.io/<packagename>, I have 404 error (files not found). Is this because of empty gh-pages branch? Or, is this because I am not using <username>.github.io? The instruction does not provide much, so could you share me any extra documents that explains how to publish a project website on Github using pkgdown?
Thank you!
Sorry for not providing an reproducible example.
I tried re-run
usethis::use_pkgdown_github_pages()
command
commit and push the changes on md files + use pkgdown::build_site() to check locally.
I thought if I made changes on the md files and push the changes to GitHub master branch, pre-setuped bots or codes by use_pkgdown_github_pages() builds and publish the webpage.
Just want to update my situation:
I don't know how and why, but 'gh-pages' branch is mirroring the main/document folder for some reason. Github action called "pages build and deployment" ran successfully from mirrored 'gh-pages' branch.
I've been trying to create a personal site using blogdown and the academic template:
blogdown::new_site(theme = "gcushen/hugo-academic")
However when I try to attach the site to github pages I get the error:
our site is having problems building: The variable {{2\left( {x + 4} on line 58 in content/slides/example-slides.md was not properly closed with }}. For more information, see https://help.github.com/articles/page-build-failed-tag-not-properly-terminated/.
It looked properly terminated...but regardless, I've tried to delete the file but alas the same error comes up even with its removal.
The site is https://github.com/sebastiz/SebastianZekiCV/
In order to publish a user site via github pages either:
1) the name of the repository must be exactly .github.io
In this case, the pages will be served from the HEAD of your master branch (or the gh-pages branch - your choice). The root of the repository is the root of the site.
2) the name of the repository can be anything. In this case, it will served from the master branch, but from the /docs directory.
In either case, github pages will run Jekyll. The only way to stop it is to have only "static" files - e.g. CSS, html pages, images, etc.
What you can do is create two repositories - one will be your source; the other will be the actual pages served. You can use hugo -d <path> to tell hugo to build its output in the root of the clone for the "output" repository.
Further reading:
github pages help configuring source
hugo command reference
For this problem, the ideal solution which is suggested is to create separate repositories for code and static content. However, the error can be solved by disabling Jekyll to run.
Create a file called .nojekyll at the root of your repository.
You can then go ahead and choose publishDir = "docs" and server from the docs/ directory in the master branch.
Drupal8 i installed Relaxed module, through that i am trying to deploy content from stage site to live site. while deploying content is going queue its not displaying on the live-site i have already checked configurations of Relaxed modules all the libraries and dependent modules are installed. even i also checked into status report its showing valid with no error.
How to deploy content to the live site from the staging site?
First of all, try to push the content from the staging environment to the live environment.
Create content and try to push it through the "Deploy" button & when you go to the "Deployments" page you will see the content was "Queued".
Here is the step try to run the CRON job from the admin side or use the command line for it:
drush core-cron.
Maybe sometimes due to the search indexing effect also the content you created might be not indexed properly.
Here use the commands:
drush sapi-r
drush sapi-i
Then try using:
drush core-cron.
*Heading a issue while rendering posts as static pages hosted in github ...
What I am willing to complete is a personal blog environment with Hugo!
By so far I have run the site locally and went well...but while deploying in Github the only thing I get when I visit the site is
Blockquote
README.md rendered as index page on :https://passager07.github.io/
I am not making it to access the ...content/post/[post].md
Blockquote
https://github.com/passager07/passager07.github.io
Hugo is for generating a static html pages: that measn you need your GutHub page space to points to those generated html pages, not md files.
You can generate those html pages in a docs folder (since August 2016) or in a gh-pages branch.
See more at "Hugo: Hosting on GitHub Pages", which uses for instance a config.toml with:
publishDir: "docs"
After running hugo, push your master branch to the remote repo and choose the docs folder as the website source of your repo.
Solution of this problem was found by :
Constructing my new repository without Readme.md file and licence.
Playing around on localhost with hugo and all the configuration (including theme) to get the greatest satisfaction!
Making sure that public folder is created running hugo
Getting a .gitingore file on public folder
Pushing it to my repository on master branch
After this steps I let https://www.netlify.com do the rest by automatic deployment!
I am having a difficult time setting up Rails 4.2 in production on a VM running on passenger and nginx, and not using RVM or anything similar.
I got Incomplete response received from application and looking in the nginx error log it said something about missing secret_key_base and secret_key although there is no reference to that last one any where in the config directory.
I ran export SECRET_KEY_BASE='...' and in rails c production ENV["SECRET_KEY_BASE"] displays the key but after restarting nginx I still get the same error.
Placing the key directly in secrets solved that problem but is there an actual way to do this correctly?
Solution:
The solution that worked for me is to place export SECRET_KEY_BASE="<string obtained from rake secret>" in .bashrc
If you use rbenv, there is another solution below in the accepted answer.
If you are using rbenv you can add the rbenv-vars plugin and add a .rbenv-vars file containing (and don't check that into your repo)
SECRET_KEY_BASE='...'
other solution is to add the the SECRET_KEY_BASE manually to the secrets.yml file and also ignore that file from your repo.
a third answer that saw mentioned is adding
export SECRET_KEY_BASE='...'
to one of these files .bashrc .bash_profile .profile
Your config/secrets.yml should have something like
development:
secret_key_base: f91fe2e2e4a9bf8f8b6aa1c296bb9ec10f2bc91c08965176a642ea0927400651ea993512f83d9823bcc046555e40b8c257f5f19fab8c59b5a02c9d230a369fe7
test:
secret_key_base: c116ac7c8f69018d1f4e10f632cac7a22348f0bd8ed8f21ca45460574d2f501f248418bc888e31556e16ba3ab58c3a7cba027140097abe3f511dddf6625fa8cd
# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
To set SECRET_KEY_BASE, first you'll need to generate it with
rake secret
Then take that output and edit your /etc/environment (depending on your distro, assuming Ubuntu here) and place it as such
SECRET_KEY_BASE=...
Restart your server and you should be gravy