HydePHP - The Static Site Generator with Caen De Silva

Welcome back to

the Laravel

Creator Series.

Today we're here

with Caen, who is

known on

Twitter and

the other socials

as Code with

Caen, creator of

HidePHP and many

other things. So

welcome to the

show Caen. Thank

you so much. Glad

to be here. I

love it, love it.

And just so

everyone knows,

you're located in

Sweden and that's

correct, right?

Correct,

southern Sweden,

pretty close to

Copenhagen. Oh

nice, I love it.

And so your

project that you

just recently

launched, well I

say recently, I

mean I think it's

been what, six

months now? Maybe

three, four?

So it's HydePHP?

Yeah, HydePHP. Oh

that's been out

for about two

years, but it's

only got an

attraction the

past four, six

months. Yeah.

Okay, well there

you go. It shows

you build it and

eventually they

will come, right?

Yeah, exactly. So

tell us kind of

like the a little

overview of

HidePHP. So

basically HydePHP

is a Laravel

based static site

generator. And I

know there

are a lot

of those or a few

Laravel based

ones already and

are quite a few

static site

generators.

So when I

set out to create

HydePHP, I wanted

something that

was a dead simple

to get

started with,

really easy to

use, but still

have the full

power of Laravel

when you need it.

So that's what I

tried to do and

it seems like

people think I

did a very job at

it. So yeah, it's

a constant

application,

you run through

the command line

just like any

other one. But

behind you, you

really

have pretty

much most things

that Lehrvel has

to offer except

for the like

really dynamic

stuff that

changes on

each request. But

we have blade

views, we have

artisan commands,

most packages

work as well if

you have a UI kit

and stuff like

that. So I really

try to make the

developer

experience as

great as

possible. But

yeah, Lehrvel

based static site

generator is a

pretty sort of

descriptive word.

I like it. So

it's just just to

sort of be clear,

it generates

static files or

it still is

basically

like a Laravel

app running on a

server. No. It

generates static

files. So you

have a project

with like

Markdown content

or blade files

and hide compiles

to static HTML

that you can

just deploy.

So it's not

intended to be

run through a web

server. However,

we do ship with a

development

web server for

like developing

it. But the rest

is just static

generated in

console in

milliseconds

per page. Gotcha.

That's pretty

sweet. And then

so I guess the

benefit with that

you can just

get a browser

here, you can

just sort of

deploy it

anywhere, right?

Like, yeah,

pretty, it's,

it's pretty

flexible as far

as all that goes.

And cheap. And

you can host it

for free.

Very cheap. I

guess my

question, could

you say you have

a Lehrvel app

already and you

want to add

a blog to it or

something? Could

you generate with

hide the static

files and somehow

just have your

other like

integrated with

your other

Lehrvel app? I

don't know, like

in the public

directory,

I guess that

might work.

Exactly. This is

a question I've

been asked a lot.

And there are

a few different

ways depending on

how standalone

you want

integration to

be. You could

just deploy

like have hide

compiled to the

public directory.

That's one way.

Really see and

how it's

standalone.

Another thing you

can do is to

build a

controller that

routes stuff to

the generated

files. Or if

you want to get

really fancy,

most of the

source code for

high PHP is in

the

framework package

that you can

require through a

lever through a

level project.

And you will

still need to do

something to

configure it into

the service

container and

stuff like that.

But once you

have that, you

can just render a

high PHP page

from the

controller. And

tie it in

and do use all

of the fancy

stuff while still

being in the full

dynamic Lehrvel

context. So that

is something you

can do and make

very cool stuff

with. That's

awesome. Yes.

And, you know, as

I was looking

at the project, I

know you do the

sort of the

standard markdown

files, you know,

you have the

front matter, I

think it's

called. Yeah. You

know, with the

titles and all

that

stuff. And then

basically, it's

just a markdown

page after that,

right? It just

kind of reads

everything

and sinks

it in. Exactly.

So I assume

you're using this

yourself. What

this is sort of

outside of the

programming

question, but

what app are you

writing your

markdown in for

your for your

personal blog

post and things

like that? Do you

have a favorite?

That's a good

one. Canada pens,

usually for the

most part, I just

do the pitch P

storm because I

tend to write

very technical

blog

posts. And then

I really

appreciate having

this full syntax

highlighting of

code blocks. If I

do documentation,

I do it within

the project. So I

can see a

reference file to

make sure I get

the syntax

correctly and

namespaces and

stuff. So that's

my favorite. If I

want to do some

light edits,

I use the code.

But sometimes if

I just want to do

something really

quick, I use the

GitHub web UI.

You can actually

manage a whole

hide project just

from the GitHub

page without

needing

to install

anything locally,

because you can

just clone the

template on

GitHub and use

actuals.

That's

interesting.

Yeah, from

everything. It's

kind of cool. Because

like, so the

Laravel news

site, all of our

posts are

actually written

in markdown. But

for me, I

use an app

called like I

writer. And I

just, I don't

know, it's just

like a markdown

app. And for

some reason,

it just doesn't

click for me to

go to PHP storm

or I writer or VS

code or any of

those others. So

it's always fun,

interesting to

find out what

people are using

for for the

different

things that we

do. And you can

really use anyone

and you don't

even need to use

front much if you

don't want to,

because you can

specify some

stuff in

configuration

files. And a lot

of stuff hide can

actually find.

So if you don't

set a page title,

we'll try to find

one from the

first markdown

heading,

and stuff like

that, or try to

generate from the

file name. So we

try to discover a

lot of stuff

for you. So

there's really

not much

boilerplate you

need to do unless

you want to do

something

that's out of the

conventions. And

that was one of

my goals when

designing this.

I love that.

Yeah. So

basically, yes,

you're like first

heading or your

file name. I like

I like the yeah,

trying to be

smart and make it

easier. That way,

you don't have to

have all that

front matter

stuff that

exactly is

probably

duplicated

anyway, like most

of the time.

Yeah, it really

is. Yeah, I was

gonna say I

assume most

people don't even

deal with that.

What about like

dates? I guess

that comes to the

file name too.

In the next

version of hide,

we will support

setting dates in

the file names.

And also

ordering using

numerical

prefixes that

would unstrip.

But for now, if

you want to

publish date,

the default blog

post system

supports a lot of

different

formats. So you

can just

put in any

string that is

state time

compatible with a

string to time in

PHP. And we'll

use that to

formalize

and personal

normalize the

output date. If

you want to do

like when it was

published

and stuff

like that.

Gotcha. Gotcha.

How how are you

brings me to

another question?

How are you

handling like

images in the

blog post? Like

is is that

something fancy

there you

got? Or is that

depends on what

you think as

fancy, I would

like to think

it's the dumbest

way possible to

do things.

We have a media

directory that is

copied to the

site output

directory. So you

can just

reference

in using relative

pass, so just

media slash

whatever. And in

front matter, you

don't even

need to specify

the media because

we'll find out

automatically. So

yeah, just a dumb

way to do it.

But it, it makes

sense when you

think about it, I

want you to be

able to visualize

and understand

implicitly where

something is

going to be saved

and accessible

from the file

structure.

Right, right.

That makes sense.

Yeah, I'm, you

know, I keep

going back

because like,

our site, you

know, we end up

pushing all the

assets to s3.

And, and then we

use cloud for

in front of that,

which I honestly

assume all that

would actually

because Laravel

supports

most of that

stuff out of the

box, like,

because Laravel

supports it, hide

supports

it. Yeah.

Or at least you

could tap in and

do it if you you

could tap into

it. We have a

really powerful

thing called

build tasks,

where you could

potentially just

use that to run

some code

during deployed,

and just sync to

s3 or something.

Think your local

media file study

with the media

file research,

you can version

control it.

Because it's

optional if you

want to version

control the site

output, I prefer

not to version

control that for

a lot of

projects.

But you can,

if you want to,

if you just want

to deploy

straight from

there. Right,

right.

Well, I guess,

my next question

is more of like,

to go back in

history, like,

why did you

originally

create this?

What was your was

it just sort of

something that

you wanted to

scratch your own

itch about? Or

just you just

like this, like

creating things

like this? I

think I had a few

go arounds with

doing different

markdown

generates

markdown based

website

generations for

various

stuff I needed.

It started when I

just wanted

something quick

for like privacy

policy pages, I

just rendered

that from

markdown, then I

realized, well, I

could render that

both page from

this too.

So I started

in a lot of level

apps, do very

repeated logic

and steps. So I

first like made a

package for

for things like

that that I used

myself just to

share. Then I

thought, well,

why do I

even need

to run a web

server for these

things? A lot of

projects, I don't

feel like I need

to do that. So

that's where the

idea was to, to

build something

more standalone.

Usually, when I

hold talks about

hide, I say, ever

wanted to host

the Laravel on

GitHub pages? No,

you can, because

that's kind

of what it feels

like. That's

something I'm

really happy

about. But yeah,

it was just

because I

needed something

myself. And I saw

that others might

be able to use

this, because

it's such a

simple way to get

started. And get

a website, you

can literally

have a website

out in

less than five

minutes, because

we shipped with

default, with

bundle views,

tailwind, and

blade

components for

most things you

need. So you can

really get

started quickly.

That's awesome.

Well, what was,

what was the

hardest thing

about building it

with, you know,

from the

developer

standpoint?

Like, did you run

into any like

major problems or

anything?

Or was it?

I think the most

the hardest

problem has not

been developing,

it has been

maintaining

it and

maintaining a

balance of all

the cool stuff I

want to do. And

then also being

able to

support it,

if I build

something just

for myself, I can

get crazed into

whatever I want.

Here, I

still need

to consider I

cannot break

anyone's website.

So I need to

dedicate very

much time to code

quality.

And I need to

prioritize which

features can I

maintain, because

right now I'm the

only maintainer,

open source

contributions are

very well kept as

always. But it's

mainly just been

me. So I really

had to prioritize

and I think it's

been the hardest

to make sure how

can I

deliver a quality

experience when

it's just me

who's doing this

in my free time.

Right, right.

That's

that I feel

like that's the

worst case about

publishing

something, you

know, it's always

fun to build

it and publish

it. But yeah,

like, well, now

I've got to

manage this until

the end

of time. So

I don't mind

managing it. I

this is something

I've been working

on for close to

three years.

I was three years

ago in May, I

started, and then

I released it one

year after.

And that is

coming up in two

years and I still

love working with

it and

contributing and

developing

it. That's

awesome. What

about templates?

Have you thought

about like having

a

template system,

like, I mean, not

a system, but

like designs that

like you could

already like pre

install and use,

or you're

thinking more

like people's

already going to

come with with

their own

design stuff.

Yeah, that was

one of the

initial decisions

that I thought

about if I was

going to support

for the one and I

decided not to do

it because I

have, sadly, I

have experience

in WordPress. And

I remember you

find a team that

looks good. So

you install it

and then you

realize,

wait, this won't

work because it's

missing critical

features, but now

it's too late.

So I was

thinking, if I'm

going to offer

either myself or

others to

install teams,

I will want to

make sure that

they are quality.

And I can't

really control if

someone makes a

bad theme and

then someone gets

upset that well,

now they can't

really use their

site because

it didn't work

out. So that's

not something

I've been wanting

to support. So

instead,

it's just we

shift with a

quality starter

team, in my

opinion, that's

really

minimalistic

and not

too opinionated.

So it works for

most things. But

you can customize

it or you can

swap it out.

So if you want

something more

custom, I think

just build your

own blade views,

or you can just

pull in one of

the Laravel UI

kits or Laravel

templates and do

that. But I know

there is a guy

who recently made

a package called

I think Laravel

team, or hide PHP

layouts manager

that in user

land manages

themes. And

that's something

I feel is

support. And

inside this

extensible,

I think

that's a great

way for the

community to

offer things.

It's just

something I don't

feel like I

could guarantee a

good experience

for. Right,

right. Now that

totally makes

sense. And

speaking

of WordPress, I

came, I don't say

I came from

WordPress, but I

use WordPress for

many years on

my personal site.

And it was it was

about like what

you said, you

would go find a

theme and you're

like, Oh, this is

gonna be great.

And then you

install it and

like the content

don't match

anything that we

had. And it's

like, well, I'm

just wasted two

hours of my life

trying to get

this going. It's

like it's

supposed to be a

simple install.

But yeah, that

makes that

does make

perfect sense

there. Yeah, so

that's really

what I wanted to

avoid with with

that decision.

You know,

something that

would be cool in

theory, for sure.

Yes, yes. So I

guess outside of

like, I keep

thinking of like

the use case

being like a blog

or just like

articles, but I

assume like

you're having it

probably with

what

documentation?

Yeah,

it can kind of be

used kind of all

over the

place, right?

Yeah, exactly.

And I commenting

people use it for

is documentation.

And it actually

comes with,

with a module

that is designed

for, like making

the

documentation. So

you just need to

put your

marks on files in

the docs source

directory, and

hide will use the

templates

we have and

populate a

sidebar, it will

generate a search

index that works

on the

client side.

To search between

the pages, it has

is responsive has

night and

dark mode,

night and day

mode, and just as

a lot of pages.

So it's really

quick to get a

documentation

page.

And if you have

an API key from

torchlight by

Aaron Francis,

just drop it in

the environment

like

automatically

enable syntax, I

think, which I

think is

really neat.

Yeah, that that

was, that's sort

of a little

hidden feature of

where all the

editor or the

torchlight.

Because this is

sort of I'm going

off the topic of

hide, but I use

torchlight. And

if you go into

the docs, like

you can do all

kinds of crazy

stuff like

you could

have lines

commented out,

you can have, you

know, GitHub, or

like DFS,

basically, it's,

it's pretty cool.

Checked out that

one. Yeah.

I also built for

my code

screenshots, I

built a tool

called the window

light

that's a spin on

torchlight. And

so it lets you

use torchlight in

a browser to

generate code,

a switch code

screenshots. And

you can also use

all of these

steps and cool

stuff

like that to

make really cool

code screenshots.

Oh, that's

awesome. So you

need to send me

that link. So

we'll be sure to

add it to the

show notes.

Because, you

know, we're

always sharing

stuff on like

Instagram. And

you know, you got

to do pictures.

So it's having

having many tools

available, like

I've already I

think I have four

or five bookmark

now. And I just

kind of rotate

through whatever

I'm trying to

highlight that

day or whatever

is new in

layervel

releases. So

having

having another

option will be

sweet and

especially

supports all that

syntax

highlighting.

Yeah, awesome.

And that was one

of the things I

also made for

myself for a lot

of screenshots

for high PHP,

actually. So I

just made it

available at the

window light dot

the silver dot SC

and I'll send you

the link to

sweet. Yeah,

that's awesome.

So to close out

on high PHP, is

there

anything we missed

that you want to

highlight? Or do

we kind of cover

most of the stuff

about it? I think

we covered

most things. So I

mean, there are

tons of features

like automatic

navigation menus,

you can use the

default layer of

config, you can

run stuff all

from the cloud

using yaml

configs if you

want to, website

maps, RSS feeds,

and yeah, just a

bunch of stuffs.

But basically,

it's a level

GitHub pages, you

can do everything

you're used to.

So there is no

learning

curve for

a level

developers, just

easy and quick to

get started with

and super if you

ever need to do

more advanced

stuff, the height

won't get in your

way. It will give

you the same

tools that are

available so you

can do really

cool stuff. I

love it. I love

it. Yeah, the

definitely,

you know,

if you haven't,

if you haven't

checked it out,

go check out high

PHP. It's a cool

little app. And,

you know,

especially if

you're going to

run a blog or,

you know,

documentation,

anything

static files

to go check it

out for sure. So

what else you've

been working on

anything fun and

exciting you got,

you got the code,

you got the code

things you got

had PHP and

anything else?

Well, I know

you're going to

talk about it

next week with

Jason, but I well

a few months ago,

or last year, I

paired up with

Jason McCurry,

the creator of

Laravel shift.

And we made a new

side project

together called

release on you

that generates

release notes

from your Git

history.

So that was

really fun to

work with a true

Laravel legend.

So awesome.

So so release.new

it's, you said it

creates a go, or

go and give me

the two minutes

pitch on

new that way. It

doesn't need two

minutes.

Basically, it's a

website, you're

greeted with

a form, you just

paste in

currently only

support the

GitHub. So paste

in your GitHub

URL. And which

version is the

latest and the

branch, and we

will clone the

repository and

scan through the

commit logs. And

from that,

generate release

notes. So you

then get in a

window on a

single page. And

there are a few

checkboxes you

can think around

with to control

the output. For

example, you want

to link to the

user to create

it, do you want

to show the

commit hash, we

can even show

unlike the

GitHub UI, or

releases, we can

show just direct

single commits,

and do the hashes

or PR numbers.

And we have our

categorizations

that you can take

in and

automatically put

everything in

categories

like changed,

added and fixed

and stuff like

that. That was

really fun to

work on. I did a

lot of the

linguistic and

semantic analysis

to categorize

that which I

love doing.

That's awesome.

So are you using

AI behind the

scenes too on

that to help

summarize stuff?

We have thought

about that's

something we can

offer. But right

now,

categorization

is just

linguistics,

which because I

enjoy working

with that. So

that was a really

cool thing.

That's awesome.

Yeah. So I keep

thinking of like,

you know, the

like, layerbell

every time

they come

out the release,

they have, you

know, the whole

release notes of

everything. So,

so basically,

you could just

you don't have to

nobody has to go

and manually do

that anymore. You

can just

exactly go, go

use release dot

new and it's

taken care of.

Yeah, as long as

you have the

good commit

names, which you

should already

do. We actually

talked a bit to

Dries, who used

to manage the

releases for a

level and got his

input on it. And

he said, Well, if

I still, still

did releases,

I will probably

try this out. If

I remember to

quote correctly,

it was Jason who

told me that.

So I hope I don't

misquote him

right now. But

something to that

effective

memory serves.

Yeah, that's

that's really

cool. And me

being level news,

like I could

probably

even use that

for like packages

and stuff that we

cover. Yeah, the

real popular ones

when they come

out with a

new version, I

could just stick

it in there and

get out. Yeah,

and stuff.

That's an API.

Yeah, we've

talked about

adding like an

API to automate

it and stuff like

that, too.

That'll be super

cool. Yes. And so

this has already

been launched, or

it's

launching soon.

No, it's been

launched a few

months ago. I

think we went

live in the

beginning of

December,

or November might

have been

actually so yeah.

Perfect, perfect.

Yeah, that's

awesome. Yeah,

the yeah, I was

we were talking

behind before we

started. Jason's

gonna come on

next week,

because I've not

interviewed him

yet about

l'oeilville

shift. So you

can't have a

creator series

without Jason on

at some

point. So yeah,

have him talk

about that. But

yeah, so anything

else that we

should we should

cover that we've

missed? Not just

made a lot of

like random

projects. So if

you're

interested,

you can go

to my personal

website, the

silver dot SC and

go through

projects and you

will see I

think about

20 random

experiments I've

made because I

just really like

doing stuff.

But yeah, that's

pretty much it.

Gotcha. Gotcha.

Yeah, that's

awesome. And

we'll

definitely have,

you know, show in

the show notes,

we'll have links

to basically

everything we've

talked about here

and, and all

that. So, man, I

want to I want to

say thank you for

coming on and,

you know,

for spending this

time with us

letting us know

about hobby HP

and release.new

and everything

else. Thank you

so much for

having me. It was

an honor

to be here.

Creators and Guests

Code With Caen
Guest
Code With Caen
Fullstack Laravel/PHP developer focused on backend cybersecurity. Building Laravel-based static site generator @HydeFramework in public. Occasionally funny.
HydePHP - The Static Site Generator with Caen De Silva
Broadcast by