GithubHelp home page GithubHelp logo

enjloezz / site Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 19.07 MB

https://limanmys.github.io/Site/

Home Page: https://liman.havelsan.com.tr

License: GNU Lesser General Public License v2.1

CSS 2.20% HTML 12.80% JavaScript 22.56% Sass 26.30% SCSS 36.14%

site's Introduction

README

Site: https://liman.havelsan.com.tr

Repository: https://limanmys.github.io/Site/

İçerik:

  1. Github Actions Komutları
  2. Hugo'nun Yapısı

1. Github Actions Komutları

Site/.github/workflows/main.yml

Hugo Versiyonu

Repository'de ki Hugo versiyonunu aşağıdaki Github Actions komutu ile kontrol ediliyor. Gerekli olan .deb paketi yoksa komuttaki linkten indiriyor. Buradaki linkleri değiştirerek Hugo'nun versiyonunu değiştirebiliriz. Fakat Hugo'nun Extended versiyonu olması gerekiyor.

- name: Setup Hugo
  run: |
    [ ! -f ./hugo_extended_0.69.0_Linux-64bit.deb ] && wget https://github.com/gohugoio/hugo/releases/download/v0.69.0/hugo_extended_0.69.0_Linux-64bit.deb
    sudo dpkg -i hugo_extended_0.69.0_Linux-64bit.deb
   # cd hugo
   # echo | hugo env

Sitenin Build Edilmesi

Siteyi tamamladıktan sonra paylaşmak istediğimizde, sitenin Hugo dizinine gidip hugo --minify olarak build etmemiz gerekiyor. Bu /public dizinine sitenin statik ve paylaşılmaya hazır halini derliyor. Aşağıdaki komutlar ise repositorye bir commit geldiği zaman siteyi derleyip, Github Pages'in paylaşılmak üzere ayarlandığı /docs dizinine taşıyor. Böylelikle bir kaç adımdan kurtularak, değişiklerimizi tamamladıktan sonra pushlamamız yetiyor.

- name: Build
run: |
cd hugo
hugo --minify
#########################################
- name: Replace /docs/ with hugo/public/
run: |
echo --- ls Before ---
pwd
ls
mkdir -p docs
rm -rf ./docs/*
mv -f ./hugo/public/* ./docs/ 2> /dev/null
echo --- ./hugo/public ---
ls ./hugo/public/
echo --- ./docs/ ---
ls ./docs/

Son komut olarakta yapılan değişikleri commitleyip pushluyor. (main.yml içinde bulunuyor)

2. Hugo'nun Yapısı

Site/hugo/config.yaml

Yukarıdaki .yaml dosyası üzerinden sitenin genel ve anasayfa içeriklerini değiştirebiliyoruz. Sitenin hangi kısımlarının değişebileceği dosya içindeki ayarlarda daha belirgin.

Site/hugo/themes/liman-hugo-fresh/

Detay değişiklikleri ise temalar dizini altındaki sitemizin kullandığı tema klasörünün altından yapılıyor.

Site/hugo/themes/liman-hugo-fresh/assets/

Yukarıdaki dizin ise .scss ve .sass gibi stillendirme dosyalarını içeriyor.

Site/hugo/themes/liman-hugo-fresh/content/

Bu dizin ise https://liman.havelsan.com.tr/kurulum/ gibi alt sayfaların içeriklerinin olduğu klasör. Markdown ve ya HTML dosyaları olarak oluşturulabilirler.

Site/hugo/themes/liman-hugo-fresh/layouts/

Sitenin asıl kodlarının bulunduğu klasör, ./partials dizini altında genelde config.yaml dosyası ile ayarlanan parça kodlar bulunur.

Site/hugo/themes/liman-hugo-fresh/static/

Statik dizin ise site derlenirken, derlenen klasörün içine atılacak dosyaları içerir. Bu klasörün içinde ne varsa aynısını derlenmiş sitenin ana dizinine kopyalar. Genelde ./pictures gibi alt klasörlerde resimler, ./javascript klasöründe JS dosyaları veya CNAME dosyası burada bulunmalıdır.

site's People

Contributors

aliorhun avatar berkekaragoz avatar brnskn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.