Trying to setup a particular theme called ‘sleek’ from this repo. https://github.com/flexdinesh/blogster
Current setup:
Practically zero knowledge of setting up websites.
Ipad Os, using CodeApp named app with the main repo downloaded. Dont know how to connect the app to github. Screenshot below.
#My pea size mind cannot follow developer’s instructions. Help me setup this template.
1 messages · Page 1 of 1 (latest)
OK, so the trick is that you in fact do NOT want their repo downloaded at all!
They have a create command you can type in the terminal that will build you a brand new project of your own
Okay and where do i put this command? I have an old pc which runs vs code named software. I think the repo can be opened there.
So, can you be in your Code app WITHOUT also being in any project?
Can you just have it opened and nothing loaded?
You will type this command in the Terminal (one of the tabs at the bottom of your screen)
But, you don't want to be inside an existing project
The app has this section but dont know how to connect to github
What happens if you close and first open the app? Does it ask you to open a folder or existing project? Or will it just open?
it just opens
perfect!
So, just open it. Then, go to the terminal at the bottom and that's where you can type the command. You don't need this downloaded version of the project.
In your first screenshot, your terminal showed blogster-main $ where it was waiting for commands. You ideally want that to NOT say that, but be more like just at the "root" (whatever that looks like on iOS)
Might need to open terminal ( command + shift + p ) then type terminal
Oo sorry
Oh, maybe that works too though!
I mean, presumably you're not like me and handwriting into a tablet lol
I created a new and ran this command. Nothing. If you want i can use my pc. I just need this to work.
*folder called blog
If it's easy for you to use your PC, create the project, then put it on GitHub or GitLab etc. where you can then grab it on your iPad, that might be the easiest thing to do.
I do have lots of tricks up my sleeve if we need to do this on mobile, though!
I have an android too. Should i use that?
Do you use Gitpod? (It's an online cloud dev environment.) I have a guide to doing exactly this if you're willing to make a Gitpod account: https://rainsberger.ca/guides/create-new-astro-project-in-gitpod/
Then, it shouldn't matter ipad or android or pc
Give me a minute i will make the account immediately.
You can just replace the command for create astro with this create command. But the process is the same
I have the extension installed and created a repo with zero files. Now?
OK, so you made a blank GitHub repo, and you opened it in Gitpod?
It show no workspace
Well, there should be no files or anything because it's blank. But, your terminal should show something like your-repo-name where you would type in commands
Are you saying that Gitpod will not open and create a workspace for you?
Perfect. Yeah, your dashboard would be empty if you haven't opened any repos from GitHub yet.
Yes
yup, that looks great! Now, you can enter that create command in the terminal in this window. The terminal is probably tiny at the bottom, you might need to reveal/enlarge it
This is of course all assuming that the dude's own create command works 😅
This is how we do it for Astro.
Running the create command in the terminal here should produce a new project here in this repo, which you can then sync back to GitHub and access from anywhere.
A sec please. The text and being typed but the font colour seems to be white.
And the project will be ONLY the sleek template.
Ah, fun fact! You can NOW log into Gitpod on any device, even on your computer, and you can open this Workspace from anywhere. So if the app/browser here is weird, you can try on a different device.
I ran the command like this and don't know whats going on now😢
what does your terminal path say? (your screenshots are super tiny)
/gitpod/workspace... what comes afte rthat?
k, thanks
I opened the site on my iPad but it seems that the command didn't run. Should I run the command again?
yeah, try again. I'm also trying to do it on my end here
Yeah, it's working for me.
So, is "final" the name of your blank github repository?
Yes
perfect
Yeah so you should be able at this point to type their command npx create-blogster@latest --theme sleek right in that terminal at this point, and this is what I get:
Use ./
(that will just use the folder you're already in, not make a sub folder)
oh, it didn't like that 😄
let me test, we can do that with astro
Ok, so it's not IDEAL because it's going to create this site in a subfolder... but it still should work!
It just means you'll have to cd foldername and THEN do yarn dev to start working
But it's fine!
So choose any folder name you want!
yup, then it should offer to open either a "preview" (you get a little window on your screen) or in the browser (another browser tab/window)
Congratulations! You have a new sleek project!
So, you can either work on the project right here in this window. Or, you can push your changes back to GitHub and then your project is on GitHub and you can open in from anywhere you can access it.
Ctrl + click on the localhost link and the website opens in a new window😊
How do I push this to GitHub repo?
git remote add origin https://github.com/[username]/final.git
git branch -M main
git push -u origin main
You'll have to either stop the dev server or click on the + to open a new terminal window to type that
and it might say "error, origin already exists" but that's fine
It just means "I didn't add a new remote because I already knew about it"
Safari is worst😑
I honestly hate iOS, lol. But, if you have any trouble using Gitpod, they have a Discord server with a #mobile-tablets channel because a lot of people do use iPads for dev with Gitpod!
I bought iPad only for the purpose of study and reading. It excels in these two. Beyond these reasons, I despise apple. I am with an old windows pc, an android smartphone and an apple table.😅
Yup, I use Android (phone AND huge 14" Samsung tablet), a Chromebook and Linux. So, I'm the person around here who knows all the weird ways to do things. 😄
So, you can now work on the site in Gitpod, or grab your GitHub version from anywhere!
A trouble here My lady
If you do work on it in multiple places, always commit it back to GitHub. And, with Gitpod, you can always open the GitHub version fresh every time to make sure you have the most current version by always typing github.io/#https....
I saw its review, Samsungs ultra I think. It's fabulous 😍. Linux is big guys league.
OK, so go in your browser to your GitHub repo and see what's there
It says "failed to push SOME" things..
This is what it looked like for me when it was successful:
Failed to push anything 😭
Yes, that's my tablet!
OK, yeah, so nothing pushed back to GitHub
AH!
I know what it is
(I think)
It's that stupid subfolder
you need to do the cd final or whatever you called that new folder first
see how my terminal shows I'm currently in workspace/sleek/sleek but yours just shows workspace/final?
you need to be in workspace/final/sleek/ because that's where your project, and your git is.
Ohh got it. Rectifying and repeating steps.
STUPID SUBFOLDER
You're going to have to remember this every time you want to do ANYTHING lol
In the GitHub link you typed, did you use sleek twice?
No the github link itself is just my plain repo, which is sarah11918/sleek
But, you'll always need to be cd'd into your subfolder to do anything with your project in any terminal/code editor
ok, that makes no sense
Because these are the exact instructions on GitHub when you go to your empty repository
That screenshot you sent me... this is exactly what it says you should do to push back
let me see if I can google the error message.
git push -f origin main
try that
You are right
And if that doesn't work, someone is suggesting this:
git reset --mixed origin/main
git add .
git commit -m "This is a new commit"
git push origin main
So, at this point, this is a git issue now. And I don't really know git well. (I knew those commands because I always get them from my new repository)
I'll see if anyone is around to help with git!
no git expert but I think you need to change the origin
git remote remove origin
git remote add origin new_url.git
It worked. The problem was that gitpod didn't had full access. Now I have a repo named final which has a folder name sleek which contains all the files.
Excellent! Thank you Oliver!
Any way to move those files in the final repo using command?
Yeah, like I said, not super IDEAL with your project all in a subfolder
You probably can, but I am not the person to ask 😅
I will figure something out. This was colossally helpful. Thank you very much @tepid tusk and @vagrant zealot
You guys Rock.
I mean, worst case, you DO have a working project, you can work on it, you can deploy it...
But yeah, when i've had to do this, I've honestly just moved everything out manually up to the root.
I'm sure there's a better way to do that though 😅
GitHub pages is facing error to deploy the site. It must be the subfolder issue.
omg, I hate GitHub pages as much as I hate iOS
Well I will work eventually.
Might be but I cannot find where to put those site/base in config file. I mean under which statement.
You put them in your Astro config
In this case, I'd try setting base: '/final/sleek'
with any luck, that will find your project at the subfolder
OR, you get everything moved into the root of final and your base is just /final as it expects
sarah, I saw your message in #general and was reading through the chat here a bit to see if I could help. Did you guys already manage to solve it?
Yes sir she sure did.
The git part, yes! Thank you! Now, if you happen to know how to move files easily out of a subfolder into the main root.... 😅
I should go change that message! 😄
The git repo was created in a sub folder and you want it in the main folder?
Yes. The main repo is 'final', but the gitlab pushed the files into final/sleek folder. Now I have to move them in 'final' folder
mv command probably will work
Tell me the commands I will try it. Or should I just download this repo and create new repo and move the file there🤔
Final is the git repo
Do you have a link to the repo?
I wonder if you can't just move all files into final and then git add them
I downloaded the repo and uploaded the files in a new repo. Help me write the site/base statement in this jungle.
Oh, so you don't have the folder problem anymore?
I don't think you're in the right file
Oh, wait, you are!
I wasn't expecting so much crap at the top! 😂
line 32:
site: 'https://USERNAME.github.io',
base: '/final',
integrations....
Oh, and whatever your new repo name is, if it's not "final" anymore
Looks like I was headed in a ditch anyway😢
Did you follow the whole GitHub pages guide?
GitHub pages was created to host Jekyll sites, so it's a pain for JS sites. We have a custom action for deploying.
I'm surprised that your repo starts with a capital letter?
But again, there is a HUGE file you need to create to deploy to github pages. It's not just the site/base thing. Did you do that?
And like I said, people have so much trouble with GitHub pages... I'm constantly getting people saying, "You need to do this!" for the docs.
Does it have to be on GitHub pages?
No not necessarily on GitHub. Most tutorial had files on GitHub repo so I was trying that.
Love a good gituation
Honestly, Netlify is sooooo easy. Vercel is fine, too.
Worked😍
We even use Netlify in our tutorial! https://docs.astro.build/en/tutorial/1-setup/5/
But every other page goes 404
What do I have to do here? So much work in just setting up things.
So that's why all your links are 404'ing. Because your template isn't set up for a base value.
You'd need to find EVERYWHERE that a link to another page is mentioned, e.g. nav or header, and add /last infront of them
And this is all because of GitHub pages
But, you are doing GREAT!!
Yes I will marry Netlify.
You have overcome EVERY challenge thrown at you!
gitpod and ex GitHub pages convert, Sarah you’ve also done great
Honestly, it's quite impressive what you've done. I could name like 12 points in this journey I'd have expected someone to tap out.