From 16b4ed270c382f5a499938542f15c5ec52de8471 Mon Sep 17 00:00:00 2001 From: PaulinaVPG Date: Fri, 5 Feb 2021 22:29:52 -0600 Subject: [PATCH] Modified README + Added docs for theme command re-format docs --- README.md | 53 ++---- app/views/bloghome.php | 2 +- composer.json | 3 +- custom_types/blog_home.json | 31 ++++ custom_types/index.json | 14 ++ custom_types/post.json | 107 +++++++++++ ...g_home=#=XFGkzBAAACAARSzO=#=en-us=#=y.json | 41 +++++ ...#=post=#=XFGlSxAAACEARS8B=#=en-us=#=y.json | 171 ++++++++++++++++++ ...#=post=#=XFGmHxAAACEARTKv=#=en-us=#=y.json | 163 +++++++++++++++++ ...#=post=#=XFGnQhAAAB8ARTfA=#=en-us=#=y.json | 122 +++++++++++++ documents/index.json | 1 + prismic-configuration.json | 3 + 12 files changed, 676 insertions(+), 35 deletions(-) create mode 100755 custom_types/blog_home.json create mode 100755 custom_types/index.json create mode 100755 custom_types/post.json create mode 100644 documents/en-us/XFGkzBAAACAARSzM=#=XFGkzBAAACAARSzN=#=blog_home=#=XFGkzBAAACAARSzO=#=en-us=#=y.json create mode 100644 documents/en-us/XFGlSxAAACEARS7_=#=XFGlSxAAACEARS8A=#=post=#=XFGlSxAAACEARS8B=#=en-us=#=y.json create mode 100644 documents/en-us/XFGmHxAAACEARTKt=#=XNAzShEAAOYSjuMH=#=post=#=XFGmHxAAACEARTKv=#=en-us=#=y.json create mode 100644 documents/en-us/XFGnQhAAAB8ARTe-=#=XFGpshAAAB8ARUKH=#=post=#=XFGnQhAAAB8ARTfA=#=en-us=#=y.json create mode 100644 documents/index.json create mode 100644 prismic-configuration.json diff --git a/README.md b/README.md index 826afc3..7a51d42 100755 --- a/README.md +++ b/README.md @@ -1,54 +1,41 @@ -## Sample Blog with API-based CMS +## Prismic & PHP Example Blog -This is a sample blog template in PHP with content managed in prismic.io (an API-based CMS). +[PHP](https://www.php.net/) example blog project with content managed in [Prismic](https://prismic.io/) -#### Getting started - -Read [this guide](https://intercom.help/prismicio/examples/php-samples/sample-blog-with-api-based-cms-in-php) for instructions to create your repository and use the sample blog. - -#### Deploy your PHP blog - -An easy way to deploy your blog is to use [Heroku](http://www.heroku.com). Just follow these few simple steps once you have successfully [signed up](https://id.heroku.com/signup/www-header) and [installed the Heroku toolbelt](https://toolbelt.heroku.com/): - -Create a new Heroku application - -``` -$ heroku create -``` - -Initialize a new Git repository: +## Check out the dedicated article to get this project up and running +> [Prismic project guide](https://user-guides.prismic.io/en/articles/868735-sample-blog-with-api-based-cms-in-php) +### 1. Install the prismic-cli ``` -$ git init -$ heroku git:remote -a your-heroku-app-name +npm install -g prismic-cli ``` -Commit your code to the Git repository and deploy it to Heroku: - +### 2. Run the theme command +This will create a new Prismic content repository, setup the custom types, and install the project code ``` -$ git add . -$ git commit -am "make it better" -$ git push heroku master +prismic theme --theme-url https://github.com/prismicio/php-blog --conf prismic-configuration.json ``` -Ensure you have at least one node running: +### 3. Update your repo name +Open your config.php file and update your-repo-name with your repository name ``` -$ heroku ps:scale web=1 +define('PRISMIC_URL', 'https://your-repo-name.prismic.io/api/v2'); ``` - -You can now browse your application online: - +### 4. Run the project ``` -$ heroku open +composer install +./serve.sh ``` - +Then you can access it at [http://localhost:3000](http://localhost:3000). +## Learn more about using Prismic with PHP +[Prismic PHP Documentation](https://prismic.io/docs/technologies/getting-started-php) ### Licence This software is licensed under the Apache 2 license, quoted below. -Copyright 2017 Prismic.io (http://www.prismic.io). +Copyright 2021 [Prismic.io](http://www.prismic.io). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. \ No newline at end of file +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/app/views/bloghome.php b/app/views/bloghome.php index 9447f41..2188b7f 100755 --- a/app/views/bloghome.php +++ b/app/views/bloghome.php @@ -10,7 +10,7 @@ $title = RichText::asText($bloghome->data->headline); $isBloghome = true; -$imageUrl = !$bloghome->data->image ? $bloghome->data->image->url : ''; +$imageUrl = $bloghome->data->image ? $bloghome->data->image->url : ''; $linkResolver = $prismic->linkResolver; ?> diff --git a/composer.json b/composer.json index 7d98dfc..222df66 100755 --- a/composer.json +++ b/composer.json @@ -1,5 +1,6 @@ { - "name": "PHP Blog Example", + "name": "php-blog/example", + "description": "PHP blog sample with Prismic CMS", "version": "2.0", "require": { "php": ">=7.1", diff --git a/custom_types/blog_home.json b/custom_types/blog_home.json new file mode 100755 index 0000000..4585f2d --- /dev/null +++ b/custom_types/blog_home.json @@ -0,0 +1,31 @@ +{ + "Main": { + "headline": { + "type": "StructuredText", + "config": { + "single": "heading1", + "label": "Headline", + "placeholder": "Main title..." + } + }, + "description": { + "type": "StructuredText", + "config": { + "multi": "heading2", + "label": "Description", + "placeholder": "Sub-title..." + } + }, + "image": { + "type": "Image", + "config": { + "constraint": { + "width": 140, + "height": 140 + }, + "thumbnails": [], + "label": "Image" + } + } + } +} diff --git a/custom_types/index.json b/custom_types/index.json new file mode 100755 index 0000000..655b89a --- /dev/null +++ b/custom_types/index.json @@ -0,0 +1,14 @@ +[ + { + "id": "blog_home", + "name": "Blog home", + "repeatable": false, + "value": "blog_home.json" + }, + { + "id": "post", + "name": "Post", + "repeatable": true, + "value": "post.json" + } +] diff --git a/custom_types/post.json b/custom_types/post.json new file mode 100755 index 0000000..292425d --- /dev/null +++ b/custom_types/post.json @@ -0,0 +1,107 @@ +{ + "Blog Post": { + "uid": { + "type": "UID", + "config": { + "label": "UID", + "placeholder": "unique-identifier-for-blog-post-url" + } + }, + "title": { + "type": "StructuredText", + "config": { + "single": "heading1", + "label": "Title", + "placeholder": "Blog Post Title..." + } + }, + "date": { + "type": "Date", + "config": { + "label": "Date" + } + }, + "body": { + "type": "Slices", + "fieldset": "Slice zone", + "config": { + "labels": { + "image_with_caption": [ + { + "name": "emphasized", + "display": "Emphasized" + }, + { + "name": "image-full-width", + "display": "Full" + } + ] + }, + "choices": { + "text": { + "type": "Slice", + "fieldset": "Text", + "description": "A rich text section", + "icon": "text_fields", + "non-repeat": { + "text": { + "type": "StructuredText", + "config": { + "multi": "paragraph, preformatted, heading2, heading3, strong, em, hyperlink, embed, list-item, o-list-item, o-list-item", + "allowTargetBlank": true, + "label": "Text", + "placeholder": "Post text..." + } + } + }, + "repeat": {} + }, + "quote": { + "type": "Slice", + "fieldset": "Quote", + "description": "A quote section", + "icon": "format_quote", + "non-repeat": { + "quote": { + "type": "StructuredText", + "config": { + "single": "paragraph", + "label": "Quote", + "placeholder": "Post Quote..." + } + } + }, + "repeat": {} + }, + "image_with_caption": { + "type": "Slice", + "fieldset": "Image with Caption", + "description": "An image with an optional caption", + "icon": "image", + "non-repeat": { + "image": { + "type": "Image", + "config": { + "constraint": { + "width": 1200 + }, + "thumbnails": [], + "label": "Image" + } + }, + "caption": { + "type": "StructuredText", + "config": { + "single": "heading3", + "label": "Caption", + "placeholder": "Image Caption..." + } + } + }, + "repeat": {} + } + } + } + } + } +} diff --git a/documents/en-us/XFGkzBAAACAARSzM=#=XFGkzBAAACAARSzN=#=blog_home=#=XFGkzBAAACAARSzO=#=en-us=#=y.json b/documents/en-us/XFGkzBAAACAARSzM=#=XFGkzBAAACAARSzN=#=blog_home=#=XFGkzBAAACAARSzO=#=en-us=#=y.json new file mode 100644 index 0000000..e895c1a --- /dev/null +++ b/documents/en-us/XFGkzBAAACAARSzM=#=XFGkzBAAACAARSzN=#=blog_home=#=XFGkzBAAACAARSzO=#=en-us=#=y.json @@ -0,0 +1,41 @@ +{ + "headline": [ + { + "type": "heading1", + "content": { "text": "John Doe Journal", "spans": [] } + } + ], + "description": [ + { + "type": "heading2", + "content": { "text": "Product designer @prismic.io 🇫🇷", "spans": [] } + } + ], + "headline_TYPE": "StructuredText", + "headline_POSITION": 0, + "description_TYPE": "StructuredText", + "description_POSITION": 1, + "image_TYPE": "Image", + "image_POSITION": 2, + "slugs_INTERNAL": ["john-doe-journal"], + "image": { + "origin": { + "id": "XFGVghAAACAAROkk", + "url": "https://prismic-io.s3.amazonaws.com/react-blog-demo%2F691648d2-9ed3-4deb-90d6-5a9705341586_554d95ad6f26328ba9cd274560a493aad98fc6dd_photo-1422568374078-27d3842ba676.jpeg", + "width": 627, + "height": 587 + }, + "alt": null, + "credits": null, + "width": 140, + "height": 140, + "edit": { + "zoom": 0.23850085178875638, + "crop": { "x": -5, "y": 0 }, + "background": "#fff" + }, + "thumbnails": {}, + "url": "https://prismic-io.s3.amazonaws.com/react-blog-demo/f5f3b73a4b954234c7d3008f7ee15e616e23ce82_554d95ad6f26328ba9cd274560a493aad98fc6dd_photo-1422568374078-27d3842ba676.jpeg" + }, + "uids_INTERNAL": [] +} diff --git a/documents/en-us/XFGlSxAAACEARS7_=#=XFGlSxAAACEARS8A=#=post=#=XFGlSxAAACEARS8B=#=en-us=#=y.json b/documents/en-us/XFGlSxAAACEARS7_=#=XFGlSxAAACEARS8A=#=post=#=XFGlSxAAACEARS8B=#=en-us=#=y.json new file mode 100644 index 0000000..a65683a --- /dev/null +++ b/documents/en-us/XFGlSxAAACEARS7_=#=XFGlSxAAACEARS8A=#=post=#=XFGlSxAAACEARS8B=#=en-us=#=y.json @@ -0,0 +1,171 @@ +{ + "date": "2016-02-16", + "title": [ + { + "type": "heading1", + "content": { "text": "Space The Final Frontier", "spans": [] } + } + ], + "uid": "space-the-final-frontier", + "uid_TYPE": "UID", + "uid_POSITION": 0, + "title_TYPE": "StructuredText", + "title_POSITION": 1, + "date_TYPE": "Date", + "date_POSITION": 2, + "body_TYPE": "Slices", + "body_POSITION": 3, + "body.text_TYPE": "Slice", + "body.text_POSITION": 4, + "body.text.non-repeat.text_TYPE": "StructuredText", + "body.text.non-repeat.text_POSITION": 5, + "body.quote_TYPE": "Slice", + "body.quote_POSITION": 6, + "body.quote.non-repeat.quote_TYPE": "StructuredText", + "body.quote.non-repeat.quote_POSITION": 7, + "body.image_with_caption_TYPE": "Slice", + "body.image_with_caption_POSITION": 8, + "body.image_with_caption.non-repeat.image_TYPE": "Image", + "body.image_with_caption.non-repeat.image_POSITION": 9, + "body.image_with_caption.non-repeat.caption_TYPE": "StructuredText", + "body.image_with_caption.non-repeat.caption_POSITION": 10, + "slugs_INTERNAL": ["space-the-final-frontier"], + "body": [ + { + "key": "text$2c9f1869-dec9-4f0f-82c9-e8e88ab34f06", + "value": { + "non-repeat": { + "text": [ + { + "type": "heading2", + "content": { + "text": "Buying the right telescope to take your love of astronomy to the next level is a big next step in the development of your passion for the stars yeah.", + "spans": [{ "start": 0, "end": 149, "type": "strong" }] + } + }, + { + "type": "paragraph", + "content": { + "text": "In many ways, it is a big step from someone who is just fooling around with astronomy to a serious student of the science. But you and I both know that there is still another big step after buying a telescope before you really know how to use it.", + "spans": [] + } + }, + { + "type": "paragraph", + "content": { + "text": "So it is critically important that you get just the right telescope for where you are and what your star gazing preferences are. To start with, let’s discuss the three major kinds of telescopes and then lay down some “Telescope 101″ concepts to increase your chances that you will buy the right thing.", + "spans": [] + } + }, + { + "type": "paragraph", + "content": { + "text": "The three primary types of telescopes that the amateur astronomer might buy are the Refractor, the Reflector and the Schmidt Cassegrain telescope. The first two are named for the kind of lens that is used. It is pretty easy to see that the lens is the heart of the telescope so the kind that you will use will determine the success of your use of that telescope.", + "spans": [] + } + }, + { + "type": "paragraph", + "content": { + "text": "The refractor lens is the simplest because it uses a convex lens to focus the light on the eyepiece. So the lens bends outwards for this purpose. The refractor telescope’s strength is in viewing planets. The reflector’s strength is in seeing more distant objects and the lens is concave or bends in.", + "spans": [] + } + } + ] + }, + "repeat": [{}] + } + }, + { + "key": "quote$db81569c-546d-482d-8ec5-81430dc83369", + "value": { + "non-repeat": { + "quote": [ + { + "type": "paragraph", + "content": { + "text": "It uses mirrors to focus the image that you eventually see. The final type, the Schmidt Cassegrain telescope is the most complex and accomplishes the goals of both but it uses an involved system of mirrors to capture the image you want to see.", + "spans": [] + } + } + ] + }, + "repeat": [{}] + } + }, + { + "key": "image_with_caption$4994c131-9301-4dae-ae5d-1c999ea7f490", + "label": "emphasized", + "value": { + "repeat": [{}], + "non-repeat": { + "image": { + "origin": { + "id": "XFGVghAAAB8AROkl", + "url": "https://prismic-io.s3.amazonaws.com/react-blog-demo%2F0a02fe1b-9333-419f-989b-c6d32b65d56f_669dfce5197548b4601bd6c4f930196526888da6_photo-1451186859696-371d9477be93.jpeg", + "width": 640, + "height": 425 + }, + "alt": null, + "credits": null, + "width": 1200, + "height": 797, + "edit": { + "zoom": 1.8752941176470588, + "crop": { "x": 0, "y": 0 }, + "background": "#fff" + }, + "thumbnails": {}, + "url": "https://prismic-io.s3.amazonaws.com/react-blog-demo/20530d58fb8cc90a7f913c91e9090c5731fca199_669dfce5197548b4601bd6c4f930196526888da6_photo-1451186859696-371d9477be93.jpeg" + } + } + } + }, + { + "key": "text$5ddc7284-dfdf-479b-b68d-08992ecf12b5", + "value": { + "non-repeat": { + "text": [ + { + "type": "paragraph", + "content": { + "text": "So to select just the right kind of telescope, your objectives in using the telescope are important. To really understand the strengths and weaknesses not only of the lenses and telescope design but also in how the telescope performs in various star gazing situations, it is best to do some homework up front and get exposure to the different kinds. So before you make your first purchase…", + "spans": [] + } + }, + { + "type": "list-item", + "content": { + "text": "Above all, establish a relationship with a reputable telescope shop that employs people who know their stuff. If you buy your telescope at a Wal-Mart or department store, the odds you will get the right thing are remote.", + "spans": [] + } + }, + { + "type": "list-item", + "content": { + "text": "Pick the brains of the experts. If you are not already active in an astronomy society or club, the sales people at the telescope store will be able to guide you to the active societies in your area. Once you have connections with people who have bought telescopes, you can get advice about what works and what to avoid that is more valid than anything you will get from a web article or a salesperson at Wal-Mart.", + "spans": [] + } + }, + { + "type": "list-item", + "content": { + "text": "Try before you buy. This is another advantage of going on some field trips with the astronomy club. You can set aside some quality hours with people who know telescopes and have their rigs set up to examine their equipment, learn the key technical aspects, and try them out before you sink money in your own set up.", + "spans": [] + } + }, + { + "type": "paragraph", + "content": { + "text": "There are other considerations to factor into your final purchase decision. How mobile must your telescope be? The tripod or other accessory decisions will change significantly with a telescope that will live on your deck versus one that you plan to take to many remote locations. Along those lines, how difficult is the set up and break down? How complex is the telescope and will you have trouble with maintenance? Network to get the answers to these and other questions. If you do your homework like this, you will find just the right telescope for this next big step in the evolution of your passion for astronomy.", + "spans": [] + } + } + ] + }, + "repeat": [{}] + } + } + ], + "uids_INTERNAL": [] +} diff --git a/documents/en-us/XFGmHxAAACEARTKt=#=XNAzShEAAOYSjuMH=#=post=#=XFGmHxAAACEARTKv=#=en-us=#=y.json b/documents/en-us/XFGmHxAAACEARTKt=#=XNAzShEAAOYSjuMH=#=post=#=XFGmHxAAACEARTKv=#=en-us=#=y.json new file mode 100644 index 0000000..a23c4d7 --- /dev/null +++ b/documents/en-us/XFGmHxAAACEARTKt=#=XNAzShEAAOYSjuMH=#=post=#=XFGmHxAAACEARTKv=#=en-us=#=y.json @@ -0,0 +1,163 @@ +{ + "uid": "computer-forensics-finding-out-what-the-bad-guys-did", + "title": [ + { + "type": "heading1", + "content": { + "text": "Computer Forensics Finding Out What The Bad Guys Did With Their Computers", + "spans": [] + } + } + ], + "date": "2016-02-17", + "uid_TYPE": "UID", + "uid_POSITION": 0, + "title_TYPE": "StructuredText", + "title_POSITION": 1, + "date_TYPE": "Date", + "date_POSITION": 2, + "body_TYPE": "Slices", + "body_POSITION": 3, + "body.text_TYPE": "Slice", + "body.text_POSITION": 4, + "body.text.non-repeat.text_TYPE": "StructuredText", + "body.text.non-repeat.text_POSITION": 5, + "body.quote_TYPE": "Slice", + "body.quote_POSITION": 6, + "body.quote.non-repeat.quote_TYPE": "StructuredText", + "body.quote.non-repeat.quote_POSITION": 7, + "body.image_with_caption_TYPE": "Slice", + "body.image_with_caption_POSITION": 8, + "body.image_with_caption.non-repeat.image_TYPE": "Image", + "body.image_with_caption.non-repeat.image_POSITION": 9, + "body.image_with_caption.non-repeat.caption_TYPE": "StructuredText", + "body.image_with_caption.non-repeat.caption_POSITION": 10, + "slugs_INTERNAL": [ + "computer-forensics-finding-out-what-the-bad-guys-did-with-their-computers" + ], + "body": [ + { + "key": "text$ecfae9d1-e6ed-4110-99ca-816079972e47", + "value": { + "repeat": [{}], + "non-repeat": { + "text": [ + { + "type": "heading2", + "content": { + "text": "If you buy an Iphone, you’ve probably already worked out how much fun it is to use it to watch movies-it has that nice big screen, and the sound quality is surprisingly good too.", + "spans": [{ "start": 0, "end": 178, "type": "strong" }] + } + }, + { + "type": "paragraph", + "content": { + "text": "If you own an Iphone, you’ve probably already worked out how much fun it is to use it to watch movies-it has that nice big screen, and the sound quality is surprisingly good too. Now imagine if you knew how to download Iphone movies without having to pay. 🚀🚀🚀", + "spans": [ + { "start": 46, "end": 65, "type": "strong" }, + { "start": 88, "end": 113, "type": "strong" }, + { "start": 88, "end": 113, "type": "em" }, + { "start": 179, "end": 202, "type": "em" } + ] + } + } + ] + } + } + }, + { + "key": "quote$6081e5fd-0b75-422f-8b99-8acb85aafb2d", + "value": { + "repeat": [{}], + "non-repeat": { + "quote": [ + { + "type": "paragraph", + "content": { + "text": "As you may imagine, downloading Iphone movies for free can be very difficult unless you know exactly how to do it – not only that but you can get yourself into some serious trouble if you download from the wrong place.", + "spans": [] + } + } + ] + } + } + }, + { + "key": "image_with_caption$b9757ffb-82f7-40ca-a594-688b5b68c2a4", + "label": "image-full-width", + "value": { + "repeat": [{}], + "non-repeat": { + "image": { + "origin": { + "id": "XFGVlBAAAB8AROl4", + "url": "https://prismic-io.s3.amazonaws.com/react-blog-demo%2F055d2496-6557-4f7a-97e7-026aee8fb834_b129508ad51c1bb240b3b48689c764a3a94d4482_photo-1455612810508-8faae6db6455.jpeg", + "width": 640, + "height": 312 + }, + "width": 1200, + "height": 585, + "edit": { + "background": "#fff", + "zoom": 1.875, + "crop": { "x": 0, "y": 0 } + }, + "credits": null, + "alt": null, + "thumbnails": {}, + "url": "https://prismic-io.s3.amazonaws.com/prismic-blog-demo/2b63aed6428618c184e48f37e0c226db83ca24d3_b129508ad51c1bb240b3b48689c764a3a94d4482_photo-1455612810508-8faae6db6455.jpeg" + } + } + } + }, + { + "key": "text$3c2d029b-4fdb-49ec-8716-4bca96420fee", + "value": { + "repeat": [{}], + "non-repeat": { + "text": [ + { + "type": "list-item", + "content": { + "text": "Take the time to find a site you can trust. Hopefully your downloading relationship with this website will be a long and fruitful one, so it makes good sense to pick a site you can live with. A good way to find a reputable site is to ask around, or maybe search on the internet for some reviews or customer points of view.", + "spans": [] + } + }, + { "type": "paragraph", "content": { "text": "", "spans": [] } }, + { + "type": "list-item", + "content": { + "text": "Always keep in mind that many websites will be falling over themselves trying to get you to visit them. What’s more, many of them won’t be too subtle about it, so you’ll be faced with a million popups in some cases, and in most cases it can prove very difficult to negotiate your way out of there. Generally speaking, you are usually better off just steering clear of sites with lots of popups like that.", + "spans": [] + } + }, + { "type": "paragraph", "content": { "text": "", "spans": [] } }, + { + "type": "list-item", + "content": { + "text": "Forget about using the torrent sites, P2P sites or whatever they are called these days. There have been numerous famous sites like this over the years, with several being taken to court etc. The simple fact is that downloading from sites like this is completely against the law in most places. If you do insist on getting your free downloads from somewhere like this, please be sure to check all applicable laws for your area, as people really do go to jail for things like this. Is it worth jail to get the new Matt Damon?", + "spans": [] + } + }, + { "type": "paragraph", "content": { "text": "", "spans": [] } }, + { + "type": "list-item", + "content": { + "text": "The last tip for downloading Iphone movies is to get ready to pay. There are a few new sites around these days that will give you access to huge download databases, and totally free downloads, but not before you pay their admin fee. This fee usually gives you totally free downloads, and sometimes it lasts for your whole life too, so it’s pretty good value. As with anything, there are good and bad sites like this, so it’s definitely worhwhile for you to look around before you take the plunge.", + "spans": [] + } + }, + { + "type": "paragraph", + "content": { + "text": "These tips can really help you build up quite a sizeable Iphone movie collection, but only if you are smart. Don’t break the law, and make sure your computer is secure- happy downloading!", + "spans": [] + } + } + ] + } + } + } + ], + "uids_INTERNAL": ["computer-forensics-finding-out-what-the-bad-guys-did"] +} diff --git a/documents/en-us/XFGnQhAAAB8ARTe-=#=XFGpshAAAB8ARUKH=#=post=#=XFGnQhAAAB8ARTfA=#=en-us=#=y.json b/documents/en-us/XFGnQhAAAB8ARTe-=#=XFGpshAAAB8ARUKH=#=post=#=XFGnQhAAAB8ARTfA=#=en-us=#=y.json new file mode 100644 index 0000000..e815785 --- /dev/null +++ b/documents/en-us/XFGnQhAAAB8ARTe-=#=XFGpshAAAB8ARUKH=#=post=#=XFGnQhAAAB8ARTfA=#=en-us=#=y.json @@ -0,0 +1,122 @@ +{ + "uid": "peace-on-earth-a-wonderful-wish-but-no-way", + "title": [ + { + "type": "heading1", + "content": { + "text": "Peace On Earth A Wonderful Wish But No Way", + "spans": [] + } + } + ], + "date": "2016-02-18", + "uid_TYPE": "UID", + "uid_POSITION": 0, + "title_TYPE": "StructuredText", + "title_POSITION": 1, + "date_TYPE": "Date", + "date_POSITION": 2, + "body_TYPE": "Slices", + "body_POSITION": 3, + "body.text_TYPE": "Slice", + "body.text_POSITION": 4, + "body.text.non-repeat.text_TYPE": "StructuredText", + "body.text.non-repeat.text_POSITION": 5, + "body.quote_TYPE": "Slice", + "body.quote_POSITION": 6, + "body.quote.non-repeat.quote_TYPE": "StructuredText", + "body.quote.non-repeat.quote_POSITION": 7, + "body.image_with_caption_TYPE": "Slice", + "body.image_with_caption_POSITION": 8, + "body.image_with_caption.non-repeat.image_TYPE": "Image", + "body.image_with_caption.non-repeat.image_POSITION": 9, + "body.image_with_caption.non-repeat.caption_TYPE": "StructuredText", + "body.image_with_caption.non-repeat.caption_POSITION": 10, + "slugs_INTERNAL": ["peace-on-earth-a-wonderful-wish-but-no-way"], + "body": [ + { + "key": "text$90d78a27-1f0a-4b33-b9ad-a131e9a446a9", + "value": { + "repeat": [{}], + "non-repeat": { + "text": [ + { + "type": "paragraph", + "content": { + "text": "The preservation of human life is the ultimate value, a pillar of ethics and the foundation of all morality. This held true in most cultures and societies throughout history.", + "spans": [] + } + }, + { + "type": "paragraph", + "content": { + "text": "On first impression, the last sentence sounds patently wrong. We all know about human collectives that regarded human lives as dispensable, that murdered and tortured, that cleansed and annihilated whole populations in recurrent genocides. Surely, these defy the aforementioned statement?", + "spans": [] + } + } + ] + } + } + }, + { + "key": "image_with_caption$265e20b6-4815-4c66-bb22-83843640b072", + "label": "emphasized", + "value": { + "repeat": [{}], + "non-repeat": { + "image": { + "origin": { + "id": "XFGVghAAAB8AROkj", + "url": "https://prismic-io.s3.amazonaws.com/react-blog-demo%2Fb236f540-a5ab-40bb-b8f6-05e0e0948ed3_335e1e3b89c8b586923dd29abe3d3d6d8625137a_photo-1431887773042-803ed52bed26.jpeg", + "width": 640, + "height": 480 + }, + "width": 1200, + "height": 900, + "edit": { + "background": "#fff", + "zoom": 1.875, + "crop": { "x": 0, "y": 0 } + }, + "credits": null, + "alt": null, + "thumbnails": {}, + "url": "https://prismic-io.s3.amazonaws.com/react-blog-demo/fe83be6bd76f1d6f085978ccd3d97a00c5aa70ee_335e1e3b89c8b586923dd29abe3d3d6d8625137a_photo-1431887773042-803ed52bed26.jpeg" + } + } + } + }, + { + "key": "text$b794fc7f-4e99-438e-b0d0-7c2ed44b439a", + "value": { + "repeat": [{}], + "non-repeat": { + "text": [ + { + "type": "paragraph", + "content": { + "text": "Liberal philosophies claim that human life was treated as a prime value throughout the ages. Authoritarian regimes do not contest the over-riding importance of this value. Life is sacred, valuable, to be cherished and preserved. But, in totalitarian societies, it can be deferred, subsumed, subjected to higher goals, quantized, and, therefore, applied with differential rigor in the following circumstances: 1.. Quantitative – when a lesser evil prevents a greater one. Sacrificing the lives of the few to save the lives of the many is a principle enshrined and embedded in activities such as war and medicinal care. All cultures, no matter how steeped (or rooted) in liberal lore accept it. They all send soldiers to die to save the more numerous civilian population. Medical doctors sacrifice lives daily, to save others.", + "spans": [] + } + }, + { + "type": "paragraph", + "content": { + "text": "It is boils down to a quantitative assessment (“the numerical ratio between those saved and those sacrificed”), and to questions of quality (“are there privileged lives whose saving or preservation is worth the sacrifice of others’ lives?”) and of evaluation (no one can safely predict the results of such moral dilemmas – will lives be saved as the result of the sacrifice?). 2.. Temporal – when sacrificing life (voluntarily or not) in the present secures a better life for others in the future. These future lives need not be more numerous than the lives sacrificed. A life in the future immediately acquires the connotation of youth in need of protection. It is the old sacrificed for the sake of the new, a trade off between those who already had their share of life – and those who hadn’t. It is the bloody equivalent of a savings plan: one defers present consumption to the future.", + "spans": [] + } + }, + { + "type": "paragraph", + "content": { + "text": "The mirror image of this temporal argument belongs to the third group (see next), the qualitative one. It prefers to sacrifice a life in the present so that another life, also in the present, will continue to exist in the future. Abortion is an instance of this approach: the life of the child is sacrificed to secure the future well-being of the mother. In Judaism, it is forbidden to kill a female bird. Better to kill its off-spring. The mother has the potential to compensate for this loss of life by bringing giving birth to other chicks. 3.. Qualitative – This is an especially vicious variant because it purports to endow subjective notions and views with “scientific” objectivity. People are judged to belong to different qualitative groups (classified by race, skin color, birth, gender, age, wealth, or other arbitrary parameters). The result of this immoral taxonomy is that the lives of the “lesser” brands of humans are considered less “weighty” and worthy than the lives of the upper grades of humanity. The former are therefore sacrificed to benefit the latter. The Jews in Nazi occupied Europe, the black slaves in America, the aborigines in Australia are three examples of such pernicious thinking. 4.. Utilitarian – When the sacrifice of one life brings another person material or other benefits. This is the thinking (and action) which characterizes psychopaths and sociopathic criminals, for instance. For them, life is a tradable commodity and it can be exchanged against inanimate goods and services. Money and drugs are bartered for life.\n", + "spans": [] + } + } + ] + } + } + } + ], + "uids_INTERNAL": ["peace-on-earth-a-wonderful-wish-but-no-way"] +} diff --git a/documents/index.json b/documents/index.json new file mode 100644 index 0000000..2ac486d --- /dev/null +++ b/documents/index.json @@ -0,0 +1 @@ +{"signature":"58d5db1ff058c21d3f3ea9601c7518eadfefd5fe"} \ No newline at end of file diff --git a/prismic-configuration.json b/prismic-configuration.json new file mode 100644 index 0000000..add608b --- /dev/null +++ b/prismic-configuration.json @@ -0,0 +1,3 @@ +{ + "apiEndpoint": "https://your-repo-name.cdn.prismic.io/api/v2" +} \ No newline at end of file