#My pea size mind cannot follow developer’s instructions. Help me setup this template.

1 messages · Page 1 of 1 (latest)

solar meteor
#

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.

GitHub

A collection of beautiful, accessible and performant Astro blog templates. - GitHub - flexdinesh/blogster: A collection of beautiful, accessible and performant Astro blog templates.

#

@tepid tusk

tepid tusk
#

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

solar meteor
#

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.

tepid tusk
#

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

solar meteor
#

The app has this section but dont know how to connect to github

tepid tusk
#

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?

solar meteor
#

it just opens

tepid tusk
#

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)

vagrant zealot
#

Might need to open terminal ( command + shift + p ) then type terminal

tepid tusk
#

Hi Oliver! 😄

#

This is iOS, so it's probably not a keyboard shortcut we need 😄

vagrant zealot
#

Oo sorry

tepid tusk
#

Oh, maybe that works too though!

#

I mean, presumably you're not like me and handwriting into a tablet lol

solar meteor
#

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

tepid tusk
#

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!

solar meteor
#

I have an android too. Should i use that?

tepid tusk
#

Then, it shouldn't matter ipad or android or pc

solar meteor
#

Give me a minute i will make the account immediately.

tepid tusk
#

You can just replace the command for create astro with this create command. But the process is the same

solar meteor
#

I have the extension installed and created a repo with zero files. Now?

tepid tusk
#

OK, so you made a blank GitHub repo, and you opened it in Gitpod?

solar meteor
#

It show no workspace

tepid tusk
#

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?

solar meteor
tepid tusk
#

What's the URL of your repository on GitHub?

#

The blank one?

solar meteor
#

Ok entered the link and got a new window

tepid tusk
#

Perfect. Yeah, your dashboard would be empty if you haven't opened any repos from GitHub yet.

solar meteor
#

Yes

tepid tusk
#

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.

solar meteor
#

A sec please. The text and being typed but the font colour seems to be white.

tepid tusk
#

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.

solar meteor
#

I ran the command like this and don't know whats going on now😢

tepid tusk
#

what does your terminal path say? (your screenshots are super tiny)

#

/gitpod/workspace... what comes afte rthat?

solar meteor
tepid tusk
#

k, thanks

solar meteor
#

I opened the site on my iPad but it seems that the command didn't run. Should I run the command again?

tepid tusk
#

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?

solar meteor
#

Yes

tepid tusk
#

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:

solar meteor
#

I am at this very step.

#

Should I give name to a different folder or put 'final'

tepid tusk
#

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

solar meteor
#

😂

#

Sure

tepid tusk
#

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!

solar meteor
#

Installing dependencies with yarn.

#

Run both the following commands

tepid tusk
#

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.

solar meteor
#

Ctrl + click on the localhost link and the website opens in a new window😊

#

How do I push this to GitHub repo?

tepid tusk
#
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"

solar meteor
#

Safari is worst😑

tepid tusk
#

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!

solar meteor
#

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.😅

tepid tusk
#

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!

solar meteor
#

A trouble here My lady

tepid tusk
#

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....

solar meteor
tepid tusk
#

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:

solar meteor
#

Failed to push anything 😭

tepid tusk
#

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.

solar meteor
#

Ohh got it. Rectifying and repeating steps.

tepid tusk
#

STUPID SUBFOLDER

#

You're going to have to remember this every time you want to do ANYTHING lol

solar meteor
#

In the GitHub link you typed, did you use sleek twice?

tepid tusk
#

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

solar meteor
#

Giving error at both, sleek.git and final/sleek.git

#

Nothing pushed to git

tepid tusk
#

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

solar meteor
#

You are right

tepid tusk
#

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!

vagrant zealot
#

no git expert but I think you need to change the origin

#

git remote remove origin
git remote add origin new_url.git

solar meteor
#

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.

tepid tusk
#

Excellent! Thank you Oliver!

solar meteor
#

Any way to move those files in the final repo using command?

tepid tusk
#

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 😅

solar meteor
#

I will figure something out. This was colossally helpful. Thank you very much @tepid tusk and @vagrant zealot

#

You guys Rock.

tepid tusk
#

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 😅

solar meteor
#

GitHub pages is facing error to deploy the site. It must be the subfolder issue.

tepid tusk
#

omg, I hate GitHub pages as much as I hate iOS

solar meteor
#

Well I will work eventually.

tepid tusk
#

But, we do have a guide for that!

#

It's totally your site/base thing

solar meteor
#

Might be but I cannot find where to put those site/base in config file. I mean under which statement.

tepid tusk
#

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

lime flume
#

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?

solar meteor
#

Yes sir she sure did.

tepid tusk
#

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! 😄

lime flume
#

The git repo was created in a sub folder and you want it in the main folder?

solar meteor
#

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

vagrant zealot
#

mv command probably will work

solar meteor
#

Tell me the commands I will try it. Or should I just download this repo and create new repo and move the file there🤔

lime flume
#

Is "final" the actual git repo?

#

Or is "sleek" the git repo?

solar meteor
#

Final is the git repo

lime flume
#

Do you have a link to the repo?

solar meteor
lime flume
#

I wonder if you can't just move all files into final and then git add them

solar meteor
#

I downloaded the repo and uploaded the files in a new repo. Help me write the site/base statement in this jungle.

lime flume
#

Oh, so you don't have the folder problem anymore?

tepid tusk
#

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

solar meteor
#

Looks like I was headed in a ditch anyway😢

tepid tusk
#

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.

solar meteor
#

Anything to change here?

tepid tusk
#

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?

solar meteor
#

No not necessarily on GitHub. Most tutorial had files on GitHub repo so I was trying that.

vagrant zealot
#

Love a good gituation

tepid tusk
#

Honestly, Netlify is sooooo easy. Vercel is fine, too.

solar meteor
#

Worked😍

tepid tusk
solar meteor
#

But every other page goes 404

tepid tusk
solar meteor
#

What do I have to do here? So much work in just setting up things.

tepid tusk
#

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!!

solar meteor
#

Yes I will marry Netlify.

tepid tusk
#

You have overcome EVERY challenge thrown at you!

vagrant zealot
#

gitpod and ex GitHub pages convert, Sarah you’ve also done great

tepid tusk
#

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.

solar meteor
#

I was just stearing around, you guys did all the work.

#

I am much obliged.

#

I still have much work left. I am going to solve all that. Keep smiling guys. Love you all.