This is… nice.
Tag: Web Development
-
PDF to HTML
WSL, Ubuntu 20.05, command line, for “PDF to HTML.” Step by step.
Here are the short instructions to convert a PDF to HTML using WSL with Ubuntu 20.04:
- Install WSL with Ubuntu 20.04.
- Launch the Ubuntu terminal.
- Update Ubuntu:
sudo apt update && sudo apt upgrade -y
. - Install Poppler:
sudo apt install -y poppler-utils
. - Convert PDF to HTML using:
pdftohtml -s <input_file>.pdf <output_file>.html
- Access the converted HTML file in the same directory.
That’s it!
-
News page added back to website
The News page has been added back to the website. Some news sources were removed as they often produced RSS errors or the headlines were simply too bombastic or misleading by my standards.
On the tech side of it, I did have to add some JavaScript to the native WordPress RSS widgets, so that I links opened in a new tab, etc., below is the code snippet:
<script> // Open link in new tab let link = document.querySelectorAll('.wp-block-rss__item a') link.forEach((e) => { e.setAttribute("target", "_blank") }) // Add inline style to the <ul> let news_list = document.querySelectorAll("ul.wp-block-rss") news_list.forEach((e) => { e.setAttribute("style", "list-style-type:none; margin: 1rem auto;"); }) // Make the title inline let wp_block_rss_item_title = document.querySelectorAll('div.wp-block-rss__item-title') wp_block_rss_item_title.forEach((e) => { e.setAttribute("style", "display:inline-block!important;"); }) // Style the publish date let wp_block_rss_item_publish_date = document.querySelectorAll('.wp-block-rss__item-publish-date') wp_block_rss_item_publish_date.forEach((e) => { e.setAttribute("style", "display:inline-block!important; font-weight:bold; margin:0 8px;") }) </script>
-
WordPress 6.2 wonky update
Was it just me or did WordPress 6.2 add
<p></p>
tags in custom HTML blocks before and after line breaks? Hoping it was just a weird, one-time, bug. -
Web devs be like…
Source:
-
4-Minute Video: Using theme.json with classic themes in WordPress
4-Minute Video: Using theme.json with classic themes in #WordPress >> The theme.json is a file that allows block theme developers to control the settings and styles of the blocks in the block editor. But you can use it for classic themes too! https://learn.wordpress.org/tutorial/using-theme-json-with-classic-themes/ #LearnWP
Originally tweeted by WordPress (@WordPress) on March 11, 2023.
-
Lawyer reacts to settlement website design
I’m curious, what should a settlement website look like?
-
Example GitHub PHP Project
As a former independent web developer, I had very little use for GitHub as my project base consisted of small business owners and their requirements mostly never got past having a WordPress website and business email setup.
Today, using Git repos are vital for my workflow as I’ve been working with various teams to push web apps to live status. Now, I can’t picture not using Git repos for any project. After being a largely siloed developer, my work is now part of a very collaborative process.
With that said, I’ve been working on a personal project, jsldvr/example.com, which is a PHP web app that is supposed to make developing a website as easy as possible for those that use cPanel or AWS. The app is more of an exercise in learning how to use GitHub, and building a secure PHP app from scratch.
I don’t have a road map with this project. I simply want to have fun with it and learn as much as I can about collaborating and/or developing on GitHub.
-
Could not reliably determine the server’s fully qualified domain name, using ::1.
Preface:
I’ve been using ChatGPT as a development tool as of late. Prior to searching for possible bug fixes, I’ll check to see if ChatGPT has an answer to what I would normally use as a query on Google or Bing. In this instance, I receive the following error after running
service apache2 start
.Me:
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using ::1. Set the ‘ServerName’ directive globally to suppress this message
ChatGPT:
This message is generated by the Apache web server and is indicating that the server is not configured with a fully qualified domain name (FQDN) for the current IP address.
To resolve this issue, you can set the
ServerName
directive globally in the Apache configuration file to specify the FQDN of your server. This can be done by following these steps:- Open the Apache configuration file for editing. This is typically located at
/etc/apache2/apache2.conf
or/etc/httpd/conf/httpd.conf
. - Search for the
ServerName
directive. If it is commented out (i.e., prefixed with a#
), remove the#
character to uncomment the line. - If the
ServerName
directive does not exist, add it to the configuration file as follows:
ServerName yourserver.example.com
Replace
yourserver.example.com
with the FQDN of your server.- Save the configuration file and restart the Apache service to apply the changes:
sudo service apache2 restart
After completing these steps, the message should no longer appear and the Apache web server should be able to determine the server’s FQDN.
Result:
The error did not repeat itself.
- Open the Apache configuration file for editing. This is typically located at