Redid anchor changes to be sure each doc was updated properly

This commit is contained in:
Eric Martel
2014-03-14 23:13:39 -04:00
parent 248aa25dfc
commit 7df82049e8
54 changed files with 105 additions and 7 deletions

View File

@@ -35,11 +35,24 @@
<li><a href="/#site-header">Welcome</a></li>
{% assign lastIsChild = false %}
{% for post in site.posts reversed %}
{% if post.isChild and lastIsChild != true %}<ul>{% endif %}
{% if lastIsChild and post.isChild != true %}</ul>{% endif %}
<li><a href="/#{{ post.title | downcase | replace:' ','_' | replace:'(','' | replace:')','' | replace:'.','' | replace:'-','' }}">{{ post.title }}</a>
{% if post.isChild != true %}
{% if insideSection %}
</ul>
</li>
{% assign insideSection = false %}
{% endif %}
{% endif %}
<li><a href="/#{{ post.anchor }}">{{ post.title }}</a>
{% if post.isChild %}
</li>
{% else %}
<ul>
{% assign insideSection = true %}
{% endif %}
{% assign lastIsChild = post.isChild %}
{% endfor %}
</ul>
</li>
<li><a href="/#site-footer">Credits</a></li>
</ul>
</nav>

View File

@@ -1,2 +1,6 @@
---
anchor: getting_started
---
# Getting Started {#getting_started_title}

View File

@@ -1,9 +1,10 @@
---
title: Use the Current Stable Version (5.5)
isChild: true
anchor: use_the_current_stable_version
---
## Use the Current Stable Version (5.5) {#use_the_current_stable_version_55_title}
## Use the Current Stable Version (5.5) {#use_the_current_stable_version_title}
If you are just getting started with PHP make sure to start with the current stable release of [PHP 5.5][php-release]. PHP has made great strides adding powerful [new features](#language_highlights) over the last few years. Don't let the minor version number difference between 5.2 and 5.5 fool you, it represents _major_ improvements. If you are looking for a function or its usage, the documentation on the [php.net][php-docs] website will have the answer.

View File

@@ -1,6 +1,7 @@
---
title: Built-in Web Server
isChild: true
anchor: builtin_web_server
---
## Built-in web server {#builtin_web_server_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: mac_setup
---
## Mac Setup {#mac_setup_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: windows_setup
---
## Windows Setup {#windows_setup_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: vagrant
---
## Vagrant {#vagrant_title}

View File

@@ -1,3 +1,7 @@
---
anchor: code_style_guide
---
# Code Style Guide {#code_style_guide_title}
The PHP community is large and diverse, composed of innumerable libraries, frameworks, and components. It is common for

View File

@@ -1 +1,5 @@
---
anchor: language_highlights
---
# Language Highlights {#language_highlights_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: programming_paradigms
---
## Programming Paradigms {#programming_paradigms_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: namespaces
---
## Namespaces {#namespaces_title}

View File

@@ -1,6 +1,7 @@
---
title: Standard PHP Library
isChild: true
anchor: standard_php_library
---
## Standard PHP Library {#standard_php_library_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: command_line_interface
---
## Command Line Interface {#command_line_interface_title}

View File

@@ -1,6 +1,7 @@
---
title: XDebug
isChild: true
anchor: xdebug
---
## XDebug {#xdebug_title}

View File

@@ -1,3 +1,7 @@
---
anchor: dependency_management
---
# Dependency Management {#dependency_management_title}
There are a ton of PHP libraries, frameworks, and components to choose from. Your project will likely use several of them — these are project dependencies. Until recently, PHP did not have a good way to manage these project dependencies. Even if you managed them manually, you still had to worry about autoloaders. No more.

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: composer_and_packagist
---
## Composer and Packagist {#composer_and_packagist_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: pear
---
## PEAR {#pear_title}

View File

@@ -1 +1,5 @@
---
anchor: coding_practices
---
# Coding Practices {#coding_practices_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: the_basics
---
## The Basics {#the_basics_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: date_and_time
---
## Date and Time {#date_and_time_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: design_patterns
---
## Design Patterns {#design_patterns_title}

View File

@@ -1,5 +1,6 @@
---
title: Dependency Injection
anchor: dependency_injection
---
# Dependency Injection {#dependency_injection_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: basic_concept
---
## Basic Concept {#basic_concept_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: complex_problem
---
## Complex Problem {#complex_problem_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: containers
---
## Containers {#containers_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: further_reading
---
## Further Reading {#further_reading_title}

View File

@@ -1,5 +1,6 @@
---
title: Databases
anchor: databases
---
# Databases {#databases_title}

View File

@@ -1,5 +1,6 @@
---
title: Errors and Exceptions
anchor: errors_and_exceptions
---
# Errors and Exceptions {#errors_and_exceptions_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: errors
---
## Errors {#errors_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: exceptions
---
## Exceptions {#exceptions_title}

View File

@@ -1 +1,5 @@
---
anchor: security
---
# Security {#security_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: web_application_security
---
## Web Application Security {#web_application_security_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: password_hashing
---
## Password Hashing {#password_hashing_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: data_filtering
---
## Data Filtering {#data_filtering_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: configuration_files
---
## Configuration Files {#configuration_files_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: register_globals
---
## Register Globals {#register_globals_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: error_reporting
---
## Error Reporting {#error_reporting_title}

View File

@@ -1,3 +1,7 @@
---
anchor: testing
---
# Testing {#testing_title}
Writing automated tests for your PHP code is considered a best practice and can lead to well-built

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: test_driven_development
---
## Test Driven Development {#test_driven_development_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: behavior_driven_development
---
## Behavior Driven Development {#behavior_driven_development_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: complementary_testing_tools
---
## Complementary Testing Tools {#complementary_testing_tools_title}

View File

@@ -1,3 +1,7 @@
---
anchor: servers_and_deployment
---
# Servers and Deployment {#servers_and_deployment_title}
PHP applications can be deployed and run on production web servers in a number of ways.

View File

@@ -1,9 +1,10 @@
---
title: Platform as a Service (PaaS)
isChild: true
anchor: platform_as_a_service
---
## Platform as a Service (PaaS) {#platform_as_a_service_paas_title}
## Platform as a Service (PaaS) {#platform_as_a_service_title}
PaaS provides the system and network architecture necessary to run PHP applications on the web. This means little to no
configuration for launching PHP applications or PHP frameworks.

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: virtual_or_dedicated_servers
---
## Virtual or Dedicated Servers {#virtual_or_dedicated_servers_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: shared_servers
---
## Shared Servers {#shared_servers_title}

View File

@@ -1,8 +1,9 @@
---
isChild: true
anchor: building_and_deploying_your_application
---
## Building and Deploying your Application {#build_title}
## Building and Deploying your Application {#building_and_deploying_your_application_title}
If you find yourself doing manual database schema changes or running your tests manually before updating your files
(manually), think twice! With every additional manual task needed to deploy a new version of your app, the chances for

View File

@@ -1,3 +1,7 @@
---
anchor: caching
---
# Caching {#caching_title}
PHP is pretty quick by itself, but bottlenecks can arise when you make remote connections, load files, etc.

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: bytecode_cache
---
## Bytecode Cache {#bytecode_cache_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: object_caching
---
## Object Caching {#object_caching_title}

View File

@@ -1,3 +1,7 @@
---
anchor: resources
---
# Resources {#resources_title}
## From the Source

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: frameworks
---
## Frameworks {#frameworks_title}

View File

@@ -1,5 +1,6 @@
---
isChild: true
anchor: components
---
## Components {#components_title}

View File

@@ -1,3 +1,7 @@
---
anchor: community
---
# Community {#community_title}
The PHP community is as diverse as it is large, and its members are ready and willing to support new PHP programmers. Consider joining your local PHP user group (PUG) or attending larger PHP conferences to learn more about the best practices shown here. You can hang out on IRC in the #phpc channel on [irc.freenode.com][php-irc] and follow the [@phpc][phpc-twitter] twitter account. Get out there, meet new developers, learn new topics, and above all, make new friends! Other community resources include the Google+ PHP [Programmer community][php-programmers-gplus] and [StackOverflow][php-so].

View File

@@ -11,7 +11,7 @@ description: "An easy-to-read, quick reference for PHP best practices, accepted
{% if post.isChild != true and loop.first != true %}
{{ backtotop|markdownify }}
{% endif %}
<div id="{{ post.title | downcase | replace:' ','_' | replace:'(','' | replace:')','' | replace:'.','' | replace:'-','' }}">
<div id="{{ post.anchor }}">
{{ post.content }}
</div>
{% endfor %}