{"id":18430190,"url":"https://github.com/friendly/ddar","last_synced_at":"2025-04-13T22:41:46.501Z","repository":{"id":138802941,"uuid":"47835977","full_name":"friendly/DDAR","owner":"friendly","description":"Development for Discrete Data Analysis with R web site","archived":false,"fork":false,"pushed_at":"2020-01-29T21:15:31.000Z","size":7592,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-10T10:44:55.890Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/friendly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-12-11T15:58:19.000Z","updated_at":"2020-01-29T21:15:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"4d74953b-2002-40a9-bbc9-1cc8c1804720","html_url":"https://github.com/friendly/DDAR","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friendly%2FDDAR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friendly%2FDDAR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friendly%2FDDAR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friendly%2FDDAR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/friendly","download_url":"https://codeload.github.com/friendly/DDAR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794561,"owners_count":21162613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T05:19:50.785Z","updated_at":"2025-04-13T22:41:46.457Z","avatar_url":"https://github.com/friendly.png","language":"R","readme":"# DDAR\nDevelopment for the **Discrete Data Analysis with R** web site\n\n## Requirements ##\n\nPHP 5.3.10 or greater (5.4+ preferred)\n\nWeb server (e.g. Apache)\n\n## Overview ##\n\nThis is a simple custom php/html framework. A high-level overview of how it works,\nas follows:\n\n\u003e All site URLs are routed to the `index.php` file.  Based on the URL's path,\n\u003e the routing mechanism determines which static .html files\n\u003e to serve and loads it in place inside an outer html wrapper page.\n\n## Installation ##\n\n### Apache Web Server ###\n\nAs described above, all URLs are routed to the `index.php` file. Apache needs\na few things in place to make this happen:\n\n#### Step 1 ####\nYou will need to enable **url rewriting** in your Apache `httpd.conf` file, or\nadd it via a rewriting package.\n\n#### Step 2 ####\n\nIf you are using a ``` \u003cVirtualHost\u003e``` directive to define your web site, make\nsure it resembles the following.\n\n*Note*, the ``` \u003cDirectory\u003e``` block. This allows the project to define an\n`.htaccess` file that sets up URL rewriting.\n\n``` apacheconf\n\u003cVirtualHost *:80\u003e\n\tDocumentRoot \"/path/to/your/web/directory\"\n\tServerName web\n\t\u003cDirectory \"/path/to/your/web/directory\"\u003e\n\t\tAllowOverride All\n\t\tOptions FollowSymLinks\n\t\u003c/Directory\u003e\n\u003c/VirtualHost\u003e\n```\n\nIf you are not using a virtual host file and are serving a single\nweb site, then look for the ``` apacheconf \u003cDirectory\u003e``` block in Apache's\n`httpd.conf` file. Update as follows:\n\n``` apacheconf\nAllowOverride All\nOptions FollowSymLinks\n```\n\n#### .htaccess ####\n\nYou will also need to add an `.htaccess` file to your site root. This will setup\nURL rewriting.\n\n``` apacheconf\nRewriteEngine on\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteRule . index.php [L]\n```\n\n**Note:** If you are using an `Alias` directive, you will need to add a\n`RewriteBase` directive to the `.htaccess` file that points to the URL-path\nof your Alias.\n\n### Directory permissions ###\n\nAfter installing the website, please make both the `/scripts/bootstrap`\nand `/styles/bootstrap` directories writable by the web server.\n\n## Composer package dependencies ##\n\n### External Libraries ###\n\n- [AltoRouter](http://altorouter.com)\n- [Bootstrap](http://getbootstrap.com/)\n- [DotEnv](https://github.com/vlucas/phpdotenv)\n\n\nThis project requires [Composer](https://getcomposer.org/) to set up\nproject dependencies.\n\n### To install composer: ###\n\n``` bash\ncurl -sS https://getcomposer.org/installer | php -- --filename=composer\n```\n\n`composer` is then executable (by php) in the current directory.\n\n#### On project installation ####\n\nRun the following composer commands to install the dependencies:\n\n``` bash\ncomposer install\ncomposer run-script compile\n```\n\n#### On project updates ####\n\nRun the following composer commands to update the dependencies:\n\n``` bash\ncomposer update\ncomposer run-script compile\n```\n\n**Note:** `run-script compile` copies Bootstrap files to\n`{styles,scripts}/bootstrap`.\n\n\n## Environment variable ##\n\nYou will need to create a `.env` file in the project's root directory with\nthe following environment variable that defines which sub directory your\nsite lives in.\n\nThe following example defined the site being served from the root directory.\n\n``` bash\nBASEPATH=\"/\"\n```\n\nIf you are serving this project from a subdirectory of the website's root,\nchange the above to point to the location of the subdirectory from the\nweb root, i.e.\n\n``` bash\nBASEPATH=\"/subdirectory\"\n```\n\n**Important:** Do not include a trailing slash if you are declaring a sub directory.\n\n**Note:** If you are serving images in .html files, you will need to manually update\ntheir paths to be relative to the sub directory.\n\n## Site Map ##\n\nThis site is made up of the following initial files:\n\n```\n- index.php\n- images/\n- pages/\n  - chapters/\n\t\t- ch01.html\n\t\t- ch01/\n\t- authors.html\n\t- error.html\n\t- home.html\n\t- other.html\n\t- using.html\n- scripts/\n- src/\n- styles/\n```\n\n## Usage ##\n\n### index.php ###\n\n\u003e This is the main framework entry point. This file handles the setup of the\n\u003e html document, including the navigation and dynamic inclusion of the pages\n\u003e and chapters.\n\u003e\n\u003e **Note:** All static files in this file, are served via a `urlfor` helper\n\u003e function. This helper sets the basepath for any scripts or pages linked to\n\u003e from this page. If you plan on adding any files or pages, you will need to\n\u003e use this helper as well.\n\n### images/ ###\n\u003e This directory contains the global site images\n\n### pages/ ###\n\u003e This directory contains the main pages and the chapter pages. The main pages\n\u003e in this directory can be updated when needed. They are however hard-coded\n\u003e into the navigation in the index.php page. So adding any new pages will\n\u003e require you to add them to the index.php navigation markup.\n\n### pages/chapters/ ###\n\u003e This directory contains the chapter files. This part of the navigation is\n\u003e dynamically generated by the `index.php` file. When listing chapters, the\n\u003e `index.php` script scans the `pages/chapters/` directory, looks for any files\n\u003e of the form (e.g.) `ch01.html`, and then adds that to the chapter list in the\n\u003e chapter navigation drop down menu.\n\n### /pages/chapters/*.html  ###\n\n\u003e This directory is where you would store all the images and assets for the any\n\u003e chapter files. Ideally you would keep assets for the chapters contained in\n\u003e this way so that there would be a `ch01.html` file and its corresponding\n\u003e `ch01/` directory where its assets would live.\n\n\u003e The idea here is that you will continue to render the chapter files from\n\u003e markdown using whatever process you have in place. The only caveat is that\n\u003e the rendered .html files should ideally not contain `\u003chtml\u003e`, `\u003chead\u003e`, or\n\u003e `\u003cbody\u003e` tags. They should only contain the markup inside the `\u003cbody\u003e` tag.\n\n### scripts/ ###\n\u003e This directory contains the global site javascript files\n\n### src/ ###\n\u003e This directory contains any php libraries or helper functions used in the\n\u003e `lindex.php` page. It contains a custom URL Router and some helpers.\n\n### styles/ ###\n\u003e This directory contains a `main.css` file which is used for the global\n\u003e styles. It also contains a `page.css` file (where you should put\n\u003e page-specific css styles), and a `chapters.css` file (where you should put\n\u003e chapter-specific css styles).\n\n\u003e You can change the markup of any of the pages to suit. Keep in mind that since\n\u003e this site uses the Bootstrap framework, you should use Bootstrap markup and\n\u003e classes wherever possible. Its not imperative that you do, but highly\n\u003e suggested since using the Bootstrap styles will keep the content responsive.\n\u003e\n\u003e Read the Bootstrap documentation for full details:\n\u003e [http://getbootstrap.com/](http://getbootstrap.com/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriendly%2Fddar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffriendly%2Fddar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriendly%2Fddar/lists"}