-
Notifications
You must be signed in to change notification settings - Fork 0
/
feed_generator.php
55 lines (40 loc) · 2.29 KB
/
feed_generator.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
// GENERAL SETTINGS ---------------------------------------- //
# the timezone referenced by the system for automatic timestamping.
# suported timezones: https://www.php.net/manual/en/timezones.php
$timezone = 'Asia/Jakarta';
$max_entries = 10;
// NAME OF FEED FILE
$file = 'articles.xml';
// FEED METADATA
# &, <, >, ', and " must be escaped as &, <, >, ', and " (reference: https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references)
$feed_title = 'jasmine's b(rain)log | jasm1nii.xyz';
$feed_subtitle = 'blog articles by jasmine';
## location of the blog index page (or if unavailable, your main page).
$blog_url = 'https://jasm1nii.xyz/blog/articles';
## permalink to the XML feed on your site.
$feed_url = 'https://jasm1nii.xyz/blog/articles/articles.xml';
## information about the feed author.
$author_name = 'jasmine';
$author_email = 'contact@jasm1nii.xyz';
$author_homepage = 'https://jasm1nii.xyz/';
$feed_icon = 'https://jasm1nii.xyz/assets/media/itchio-textless-white.svg';
$feed_logo = 'https://jasm1nii.xyz/assets/media/main/07042023-me_compressed.webp';
$rights = '© 2023 - jasmine amalia';
/* -------------------- */
// PATH TO FETCH PAGES FROM
## __DIR__ is the directory where *this script* is located.
$site_root = dirname(__DIR__, 2).'/public_html';
## once i'm there, i specify the parent directory where i keep all of my blog pages.
## because the values of $blog_root and $blog_entries will be used for generating entry links, forward slashes are a *must*.
$blog_root = $site_root.'/blog/articles';
## then, specify a pattern that matches the path of each individual page. for example, this will match /YYYY/MM/DD/entry (any file extension).
$blog_entries = $blog_root.'/*/*/*/[entry]*';
/* -------------------- */
// ENTRY METADATA
## depending on your site setup, this might not be the same as $blog_url.
## the generator will appended $blog_root to the URL specified below.
$blog_directory_url = 'https://jasm1nii.xyz/blog/articles';
// END OF CONFIG ---------------------------------------- //
require __DIR__.'/feed_generator_functions.php';
?>