Deploy Angular Project with CI /CD to Hostinger with FTP

 1. creat a folder in your project root folder with name .github 2. create second folder in .github/workflows 3. create file in your .github/workflows/main.yml paste this code in main.yml file on :   push :     branches : main <--- select your branch name name : 🚀 Deploy website on push jobs :   web-deploy :     name : 🎉 Deploy     runs-on : ubuntu-latest     steps :     - name : 🚚 Get latest code       uses : actions/checkout@v3     - name : Use Node.js 18       uses : actions/setup-node@v2       with :         node-version : '18'           - name : 🔨 Build Project       run : |         npm install               npm run build       - name : 📂 Sync files       uses : SamKirkland/FTP-Deploy-Action@v4.3.4   ...

Dynamic meta tags in php

 //  red  code for get current url 


// green code for get dynamic meta  tags

 In  Codeigniter  pass  the data in header page just like  below :

$data = select record from table 

$this->load->view('common/header,data);      

 <?php 

     

       if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')   

         $url = "https://";   

    else  

         $url = "http://";   

    // Append the host(domain name, ip) to the URL.   

    $url.= $_SERVER['HTTP_HOST'];   

    

    // Append the requested resource location to the URL   

    $url.= $_SERVER['REQUEST_URI'];    

      

    

      

$where=[

'status' =>'A',

];

$data= $this->app_model->select_all('meta',$where);

?>

     

    <meta name="google-site-verification" content="zCAmvLStTnJOn0gXqNfKfHeN1Hr0Xvk0C4xzvvwSEUg" />

    <!-- Required meta tags -->

    <meta charset="utf-8">

    <meta name="viewport" content="width=device-width, initial-scale=1">

    <?php 

 

    if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')   

         $url = "https://";   

    else  

         $url = "http://";   

    // Append the host(domain name, ip) to the URL.   

    $url.= $_SERVER['HTTP_HOST'];   

    

    // Append the requested resource location to the URL   

    $url.= $_SERVER['REQUEST_URI'];    

    $package=strpos($url,'package');

    $service=strpos($url,'service');

    $about=strpos($url,'about');


    foreach($data as $list){ if(@$list->meta_for==1){ if($package=='' && $service=='' && $about == ''){ ?>

    <title>CuDel - Beauty Salon at Home | Beauty Services at Home</title>

    <meta name="description" content="<?=@$list->meta_description?>"/>

    <?php }}  else if(@$list->meta_for==4){ if($package){ ?>

    

    <title><?=@$meta->meta_title?></title>

    <meta name="description" content="<?=@$meta->meta_description?>"/>

    <?php }} 

    

    else if(@$list->meta_for==3){ if($service){ ?>

   

    <title><?=@$category->meta_title?></title>

    <meta name="description" content="<?=@$category->meta_description?>"/>

    <?php }} 

    

    else if(@$list->meta_for==2){ if($about){ ?>

    <title>Beauty Salon at Home | For Booking Contact @ 9311147877</title>

    <meta name="description" content="<?=@$list->meta_description?>"/>

    <?php }}    

    } ?>

   

    <link rel="canonical" href="<?php echo @$url ?>" />

Comments

Popular posts from this blog

Ms Office 2019 activation link