/    Sign up×
Community /Pin to ProfileBookmark

technology to learn advice

Hello.

Could you please help me with a little advice?

I intend to start a website. I have already bought the domain name and a webhosting. I want to publish there articles, let’s say one in every three days, ie about a hundred and twenty a year.

I want to design and code the whole website. I prefer not tu use any content management system, like WordPress.

Currently I am already familiar with HTML, CSS and JavaScript at a certain level.

I am worried that a year after starting my website, when facing a situation, that I would like to change the design / make a change of a text in the footer / add a link to every page, that I would have to go through each of the 120 html files and make the same change in each of them manually.

Question: Is there some kind of technology to use / new programming language to learn that would enable to do the mentioned changes in each of the 120 articles very quickly? (without the need to edit each of them manually). Is php the answer?

Thank you for help.

to post a comment
Full-stack Developer

10 Comments(s)

Copy linkTweet thisAlerts:
@tracknutMar 18.2020 — Yes, PHP is a likely answer, look at "PHP include". But I would also suggest that maintaining 120 html files of articles is in itself a daunting task, that could be better handled with higher level coding than just html. What will you do about navigation between these articles, for example? Or what will you do to add a new article? What happens if you want to change the styling or headings on all articles? Will you manage a list of articles the customer has already read, so you don't push them at him again?

Etc, etc - lost of things that could all be done with some PHP intelligence in there.
Copy linkTweet thisAlerts:
@NogDogMar 18.2020 — Well, if you're using CSS files (as opposed to directly inputting CSS style blocks in each file or, even worse, in-line styling in HTML tags); then you only need to update the CSS file to make global style changes.

As to not using a CMS, why not? You're basically talking about a blog, and that's what Wordpress does best, for example.

Anyway, if you want to "roll your own", as an example of what could be done with PHP to make a light-weight blogging system, here's something I did not terribly long ago mainly to see if I could: https://github.com/nogdog/cwrblog
Copy linkTweet thisAlerts:
@codewitchauthorMar 18.2020 — Thank you for your replies.

Yes, I intend to start a blog.

Currently I have no clue what php is or how it works. I have seen that people wrote some kind of a question mark after the "<" sign. That is all I know now about php.

@tracknut: I intend to have tags and also categories for every article. To add a new article I intend to have a template. I intend to use CSS file - shared for all files - to make the global design changes possible.

>"Will you manage a list of articles the customer has already read, so you don't push them at him again?"

I don't know how to do that. Could the php programming language work here? But then the user would have to login, right? Currently I do not plan the login option for the readers of my blog.
Copy linkTweet thisAlerts:
@tracknutMar 18.2020 — You wouldn't need accounts and logins, you could just save a cookie (yes, using PHP) that contained all the viewed articles, and update it when someone reads another one.

I'm not sure what you would do with the tags and categories, but if you wanted you could make a "show me all articles about auto repair" kind of thing, where you used PHP to grab and display just those specific articles.
Copy linkTweet thisAlerts:
@codewitchauthorMar 19.2020 — Hello Tracknut. Thank you again for your reply.

I know nothing about php, except that it is some kind of thing coded with a question mark.

My idea of my blog is a list of new articles in the front page. I will think if I need to do the cookie thing - for a purpose of not showing the articles a user had already read.

The "show me all articles about auto repair" thing could be done with tags. Just before coding the blog, I will make a list of all tags and categories. Later, when writing a new article, I will just add some tags to it and add the new article to the "tag register" and to the corresponding category. But maybe it would be all easier with the use of the php...

I am a mathematician, I have limited knowledge in programming.

Can I ask, if I write the 120 articles in one year, where would my articles be stored, if I use the php programming language? (in some kind of SQL database or?) I know the html programming language, and just using that would my articles be stored in a .htm file - one file for each article.

Thank you for help. Good night.
Copy linkTweet thisAlerts:
@tracknutMar 19.2020 — I should reiterate NogDog's suggestion about using an existing CMS for your situation. I've only made the PHP suggestions because you've expressed interest in learning the technology, and I feel you've chosen a good path, favoring learning over a canned tool. But know that the tool would be much faster to implement!

That said, I'd recommend starting with just a few PHP items, since you have to learn the language from scratch. You could define your minimal "article template", just using text files to store the html for an article, and then use PHP to wrap an article with headers, footers, manage the cookie, and create navigation and tags. That should be plenty to start with. Using a database for your actual articles would probably be a better implementation, but that implies now also learning databases, which I'd suggest postponing until you've got PHP figured out.
Copy linkTweet thisAlerts:
@VITSUSAMar 19.2020 — @codewitch#1616354 Yes, PHP is the answer.
Copy linkTweet thisAlerts:
@codewitchauthorMar 19.2020 — Hello. Thank you for your reply tracknut. I may have more of free time now... To learn a new programming language, or two..

If I would be a programming expert, the best way to do that is to store my articles in some kind of database thing (is that what SQL is for?), and access the articles and load them to a html code to send to the browser of my blog readers using php?

Thank you for your help.

codewitch
Copy linkTweet thisAlerts:
@tracknutMar 19.2020 — @codewitch#1616418 Yes, most likely that would be how you'd do it. And adding database experience to your php, js, html, css is a good way to round out your skills.
Copy linkTweet thisAlerts:
@Harley-MiddletonMar 20.2020 — You just need a simple static website for it wordpress and other tools are very good to get the job done. It is simple simple design develop and post your blogs and articles.
×

Success!

Help @codewitch spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...