-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please document how to add this template to an existing repo #1
Comments
@plastikfan bootstrap-template is a basic set up for a Jekyll site that provides the file structure, assets, and some components to quickly start a Jekyll project--the file structure itself is the Jekyll project. So yes, you are on the correct track--you need to copy the full file structure to where ever you want to set up the Jekyll project. If the root of your repo is something different--for example containing some software project, and the new Jekyll project is just for creating a documentation website--the best options are to use the docs/ folder or to create a new branch which you clean out and use to host only the documentation. In these situations a lot of people also just have a separate documentation repository. So, if you do want to build the site from the "docs/" folder, then yes, you would copy the full contents of bootstrap-template into docs/. The "docs" folder inside of bootstrap-template is just to contain information about using the template, so you could delete that or rename it to what ever you like--it is not needed for the new site. Let me know if that makes sense! |
Hi @evanwill, thanks for your response after following your instrctions and updating the _config.xml file, I am still getting strange errors. I have excluded my source code in the config inside _config.yml under the exclude key, Jekyll is getting the followng error:
This looks like Jekyll is still processing files that have been excluded. My repo is a powershell module and powershell modules user there own docs folder which contains .md files. It looks like Jekyll is processing those md files which it shouldnt be becasue they have excluded by this line in _config.yml:
The 'Elizium.Loopz/' entry here is the root of the powershell module and it has a docs folder that I just mentioned. This should not be being processed. I think I may have to use a separate repo for documenting my source code, but I would rather not. There is also a strange sass error:
in the custom.css file: @import
"theme-colors", "template", "custom"
; I don't know why theme-colors is not available, it exists as theme-colors.csv in the docs folder. (See this is why I don't like the idea of have a docs/docs folder, because that just leads to more confusion) |
I wonder if line endings has anything to do with this. I am using wsl2 on ubuntu. I extracted the bootstrap zip inside ubuntu using the unzip command. In visual studio code, the lin ending indicator for the custom.scss file indicates LF (as oppose to CRLF). |
@plastikfan if your Jekyll project is in the docs/ folder, then you need to start Jekyll Line endings don't matter to VS code or wsl2. PowerShell might care. |
Hi @evanwill, thanks for that. I restarted jekyll from the docs folder and that worked. However, when I now visit the site, none of the bootstrap styling is being applied so the page looks like this: I looked in the index.html in the generated _site files and I couldnt see anything obviously wrong in there, but there is probably an incorrect path reference somewhere, similar to the way I accidently ran Jeykll from th wrong directory. So would you have any idea why bootstrap styling isnt being applied? Thank you. PS: I realised that I can't really have my site in a separate repo from my source code, because the url would also have to be different, which is just another headache I'd rather not have. |
@plastikfan not really sure? I just pulled down your https://github.com/EliziumNet/Loopz , looked at gh-pages branch, In that version of the code there isn't a For example if this is the repo, https://github.com/EliziumNet/Loopz
Keep in mind that |
I havent commited my curent version yet. My local version has an updated version of the _config.yml with those fields setup: #######
# SITE SETTINGS
#
title: Elizium.Loopz PowerShell module documentation
description: "Documentation for Elizium.Loopz PowerShell module"
year: 2021
author: plastikfan
# add search box to navbar, true/false
search: true
##########
# URL VARIABLES [optional!]
#
# Optional if using GitHub Pages! If building manually, these must be set correctly.
#
# use url for the domain, e.g. https://thecdil.github.io
# on gh-pages follow the pattern: https://username.github.io
url: https://eliziumnet.github.io
# use baseurl to add subsection of the domain, e.g. /timelinejs-template
# on gh-pages this is a / followed by the name of the repository
# baseurl is your github repository's name prefixed with a /
baseurl: /Loopz
# location of code, the full url to your github repository
source-code: https://github.com/EliziumNet/Loopz
#######
# BUILD SETTINGS [usually leave as is]
#
# Defaults to simplify front matter,
# all files in the "pages" folder will be output at root of site
defaults:
- scope:
path: "pages"
values:
layout: page
permalink: /:basename:output_ext
# ignore stuff
exclude: [docs/, Rakefile, README.md, LICENSE, azure-pipelines.yml, Elizium.Loopz/, VERSION] |
I'm thinking that I should do the initial setup using the github ui because I managed to get this working on a test repo I have (https://plastikfan.github.io/FakeBuddy/). The problem with my Loopz repo is that I tried to do the initial setup locally using jekyll server and so far my local version is not quite working yet, because of the missing bootsrap styling. (That FakeBuddy repo works even though the config file wasnt even updated). |
Ok. so I just commited my changes then pushed. I went to test it locally again and it started to work. I have no idea what happened here. My local changes were only un-commited when it wasnt working, then I commited, then it started working. Confused! |
Thanks for helping me out with this @evanwill |
Perhaps I shouldn't close this if you intend to make some additions to your documentation to indicate how to add this template to an existing repo. Could I also suggest you have a troubleshooting section that documents anticipated mistakes users might make, eg starting the jekyll server from the wrong directory! (Feel free to close if you want tho) |
Glad you figured it out @plastikfan . the process is helpful for thinking about teaching and doc-ing. Not sure what was going on in your last mystery--only guess would be browser caching confusing things--when developing its a good idea to use a private window with dev tools open, then you can hold down refresh to get options to hard refresh everything. Good luck with the project! |
Ok great thanks. And thanks to you for creating this useful template. |
PS: that styling issue with bootstrap can be fixed in the local version of jekyll by running 'jekyll clean', then rerunning build/serve |
Hi this is a great template and I have watched your videos, so thanks for that. However I do have an issue. You assume that the bootstrap template is going to be use on a new repo. I am not going to use it this way. I have multiple repos that I intend to write documentation for using this bootstrap template, but you don't explain how to add this to an existing repo.
It seems that jekyll can only build from a docs folder, and this can't be changed as far as I know, so I'm just gonna accept this, but to me it makes sense that it should be configurable (I would rather call this site or www). When I extract this bootstrap template in the root folder, I see these folders
So there is another docs folder. Having 2 docs folders feels wrong to me. Can this docs folder be a different name? I would hope that it could be.
So to add this to an existing folder, do we just copy everything inside this extraction root, to the repo's docs folder?
Thanks.
The text was updated successfully, but these errors were encountered: