Required and optional configuration
- On this Page:
- Content Directories
- yBlog Directories
- yBlog Directories
- The yBlog.php File
- The config.php File
- The foot.php File
- (Click the images for a lightbox slideshow)
|Created: Nov 2020|
|Modified: July 7, 2021|
|Beta .33: July 7, 2021|
Content pages may be in the root directory and any directory besides the yBlog directories. By convention, image files are kept in an ./img/ subdirectory in the same directory as the content files. PDF files and ZIP files for download must be in the SITE_ROOT/inc/ directory for the plugins to work.
Content pages are in the root directory any desired folders except those reserved for yBlog, LIB, and INC. There are a few more support files in the root directory:
- ./htaccess will probably work on your ISP's server with minor
customizations (see comments in file):
- ./robots.txt is written so it needs no updating.
- ./favicons.ico may be replaced to change the icon shown in the browser toolbar
- ./sitemap.xml may be automatically updated in a future release.
- ./img/ is the suggested location for content's image files.
- ./inc/ contains downloadable files and PDFs.
- ./lib/ contains the site template and CMS PHP files, described below.
- ./lib/img contains the template's image files.
- ./lib/CodeMirror/ contains the code editor.
- ./lib/img/ contains image files for the template.
- ./lib/pwd/ contains protectedd login data.
The yBlog.php File
In the page template, the
REQUIRE_ONCE ./lib/yBlog.php statement
calls the maikn script to generate the page head, nav bar, responsive body header, TOC,
plugin insertion, and footer. This file need not be edited, but you can change the
top-of-page layout and other such features in this file.
The config.php File
Specifications for the variables are in preparation
- To set up Google Analytics, visit its site and obtain an ID for this config file.
- To set up Adobe DC Reader, visit its site and obtain an ID for this config file.
The ./lib/yBlog.php file then generates all the metadata for the page's HEAD element from the page and site variables. It also includes the site stylesheet and all scripts needed for Google Analytics and plugins.
The ./lib/yBlog.php file then closes the HEAD element and adds an opening <BODY> tag. At the top of the BODY element, yBlog inserts a HEADER element which contains the responsive header. A NAV element inside the HEADER element containing the site menu. The menu contents generated automatically.
The foot.php File
After an article's content, the ./lib/yBlog.php file adds footer content from the ./lib/foot.phpfile. Each blog site will prefer a different footer, which is edited just like a standard Web page. The .lib/yBlog.php file then performs any necessary parsing on the whole page and sends it to the browser client.