[{"content":" 宮治研究室（宮治ゼミ） # 本研究室では，ネットやウェブなどに加えて，センサやカメラなどによって収集した実世界の情報を融合することによって，社会や生活の役に立つサービスを創出することを目的としています．\nその実現の為には，「データ採取」「データ分析」「情報提示」「通信・連携」の 4 領域の技術が必要となります．\nデータ採取 # 「データ採取」では，インターネットやウェブからデータを取得する方法と，センサを利用して実世界の情報を採取する方法があります．\nネット上の情報を収集するには，インターネット上で公開されているサービスの API を利用してアクセスする方法や，インターネットのリンクをたどって目的のページからデータの複製を手に入れる方法（クローリング）があります． クローリングした情報は，そのままでは不要なデータが含まれているため，必要な部分だけを取り出す処理（スクレイピング）をする必要があります．\n実社会のデータ採取の場合には，センサ内蔵機器を利用する方法，自作電子回路にセンサを取り付けて情報を取得する方法があります．\nセンサ内蔵機器は，スマートフォンやスマートウォッチに代表される各種スマートデバイスを一例としてあげることができます．位置情報や移動速度，活動状況や心拍数など様々な情報が取得可能です． 対象の情報を取得するという意味ではカメラで取得した静止画・動画像もセンサ情報といえます．また，NUI デバイス(Kinect や RealSence など)も同様に考えることができます．\nセンサの情報を独自に取得したい場合には，電子回路にセンサを搭載したり，Raspberry Pi に代表される小型コンピュータにセンサを配置する手法をとります．\nデータ分析・機械学習 # 取得したデータを「データ分析」し，意味のある情報を取り出します．分析には，統計的なデータマイニングや機械学習の手法だけではなく，ディープラーニングやネットワーク分析などの手法も用います． これらの手法は，ライブラリを自作プログラムから呼び出して活用することが多いですが，論文を読みながら実装することもあります．\nデータ分析をすることだけが目的ではなく，あくまでもシステムで活用するためにおこなっています．分析した結果を，ソフトウェアに組み込み評価するところまでをおこないます．\n情報提示・操作 # 「情報提示・操作」する際には，可視化の為のライブラリや Unity などのゲームエンジンを利用して，「見やすくわかりやすい」工夫が必要です． また，単純にモニター上で見せるだけではなく，AR や VR などの技術の利用やスマホアプリの開発，スマートデバイスやロボット活用もします．\n通信・連携 # データ採取・データ分析・情報提示は，「通信・連携」するシステムによって統合されます． 通信・連携システムでは，サーバサイド開発／データベース／ネットワーク系プログラミングなどの技術が必要です．\nまた，これらを統合した実際のウェブサービスを展開する際には，この部分が根幹を成すことになります．\n方針 # 本研究室では，社会の問題解決やニーズに応えるために，上記要素技術を連携したシステムを開発／検証する研究をしています（それぞれの要素技術の性能向上を目指したり，研究のための研究をすることは主目的ではありません）．\nまた，その実現のための人間・社会的な側面や影響を把握するために，現在のネットと密接に関わる範囲においてのコミュニティや教育，サービスの分析，マーケティング手法などについて調査および研究をおこなっています．\nさらに，利用手法としては感性工学的な手法も積極的に活用します．社会への適用分野として，一般社会だけではなく，福祉領域への展開も視野に入れています．\n","date":"2016年8月22日","externalUrl":null,"permalink":"/about/","section":"宮治研究室 / MyjLab","summary":" 宮治研究室（宮治ゼミ） # 本研究室では，ネットやウェブなどに加えて，センサやカメラなどによって収集した実世界の情報を融合することによって，社会や生活の役に立つサービスを創出することを目的としています．\nその実現の為には，「データ採取」「データ分析」「情報提示」「通信・連携」の 4 領域の技術が必要となります．\nデータ採取 # 「データ採取」では，インターネットやウェブからデータを取得する方法と，センサを利用して実世界の情報を採取する方法があります．\n","title":"About","type":"page"},{"content":" 2025 年度 研究テーマ 2024 年度 研究テーマ 2023 年度 研究テーマ 2022 年度 研究テーマ 2021 年度 研究テーマ 2020 年度 研究テーマ 2019 年度 研究テーマ 2018 年度 研究テーマ 2017 年度 研究テーマ 2016 年度 研究テーマ 2015 年度 研究テーマ 2014 年度 研究テーマ 2013 年度 研究テーマ 2012 年度 研究テーマ 2011 年度 研究テーマ ","date":"2016年8月22日","externalUrl":null,"permalink":"/themes/","section":"宮治研究室 / MyjLab","summary":" 2025 年度 研究テーマ 2024 年度 研究テーマ 2023 年度 研究テーマ 2022 年度 研究テーマ 2021 年度 研究テーマ 2020 年度 研究テーマ 2019 年度 研究テーマ 2018 年度 研究テーマ 2017 年度 研究テーマ 2016 年度 研究テーマ 2015 年度 研究テーマ 2014 年度 研究テーマ 2013 年度 研究テーマ 2012 年度 研究テーマ 2011 年度 研究テーマ ","title":"Themes","type":"page"},{"content":" 教育の場としての研究室 # 当研究室では、研究室は教育の場と捉えて運営をしています。 単に研究や将来の仕事に必要な「技術・知識」を習得するだけでなく、エンジニアとしての思考法、課題へのアプローチ、そして伝え方を身につけることを重視しています。\n日々の発表（練習）や質疑応答、課題への取り組み、そして報告会・反省会といった実践的なイベントを通じて、マインドセットを養います。\n※現在、卒業研究では開発系のテーマに取り組むことを前提に学生を受け入れています（以前は文系的なテーマも受け入れていました）。\nゼミ（3年生） # 通年: 技術力の向上\n当研究室が重視する4つの技術領域（「データ採取」「データ分析」「情報提示」「通信・連携」）のうち、1年間で2〜3領域（前期1〜2領域、後期1領域）の習得を目指します。 各自の興味に基づいた自由課題形式でテーマを設定し、自主的な開発を通じて技術力を高めます（テーマ発表、中間発表、成果物報告あり）。これにより、日常的に自発的にあたらしい知識・技能に挑戦する姿勢を身に付けます。 ゼミの授業時間外での開発が基本です。 前期：プレゼンテーションと知識の幅を広げる\nネットサービスやビジネス、コミュニティの構造・市場への理解を深める書籍を輪読し、プレゼンを行います。情報分野の幅広い知識を得ると同時に、プレゼン手法も学びます。 テックプレゼン（ゼミ生であれば知っておきたい技術的な内容）や情報共有会を通じ、ハンズオン形式やライトニングトーク（LT）といった実践的な発表スキルも磨いていきます。 ゼミの授業時内におこないます。 後期：論文調査と研究テーマの決定 発表はゼミの授業時間内におこないます。\n次年度の卒業論文に向けて、関連論文の収集と輪読を行います。この過程で、適切かつ効率的な調査方法、論文の読み解き方を学びます。 3年次が終わる頃までには、自身の研究テーマや方針を固めます。 ゼミの授業時内におこないます。 サブゼミ（有志参加）\n参加者と相談のうえで内容を決定しますが、前期は「各種要素技術」、後期は「○○活用手法」をテーマに実施することが多いです。 ゼミの授業時間外におこないます。 卒業研究（4年生） # 研究テーマは、研究室の大きな目標に基づいた「提示テーマから選択する方式」と、「学生自身が提案する方式」の2通りがあります。どちらの場合も、教員とディスカッションを重ねて詳細を決定します。\n3年次で身につけた要素技術（2〜3領域）を駆使し、個別テーマの研究に取り組みます。 過去の研究テーマ\n学会発表: 研究成果は、外部の学会で発表することをひとつの目標として取り組みます。 社会であたりまえの事項の確認 研究活動を通じて、スケジューリングやホウレンソウ（報告・連絡・相談）といった基本的な事項を意識して確認・実施します。また、論文執筆を通じて、論理的思考力や「他者に伝わる」文章構成力を身に付けます。 大学院 # 大学院での研究テーマは、事前のサーベイと試作の結果を踏まえて決定します。そのため、テーマ決定のためのサーベイは、可能な限り学部在学中（進学前）に行うのが理想です。\n論文採録: 研究成果は、学会発表にとどまらず論文誌への掲載を目標にレベルを高めていきます。 指導経験を通じた成長: 自身の研究や技術力向上はもちろんですが、後輩への指導補助（研究相談やサブゼミ）や授業のTA（ティーチングアシスタント）もお手伝いしていただいています。経験をとおして相手の理解度に合わせて分かりやすく説明する力や、適切なタイミングでアドバイスする力を身につけてもらいたいと考えています。 その他・課外活動 # 春休み導入勉強会（新3年生向け）： 新しく配属される学生を対象に、先輩たちが技術デモや、開発を始めるための導入ハンズオンを行います（宿泊なし、2日間程度）。 夏期合宿（2泊3日・3年生は参加必須）： ハッカソン形式で開発合宿を行います。ここで作成したプログラミング作品（Webサービス、スマホアプリ、インタラクティブアート、ゲームなど）は、大学の相模原祭で出展・展示し、来場者に試遊してもらいます。チームでの開発経験を増やすと共に、技術的な交流も狙っています。 最近は夏のインターンシップの日程が悪く、夏合宿の代わりに土日に研究室に集まってもらって、宿泊無しで開発合宿をしてもらっています。 学外活動の推奨： 実務レベルのスキルアップを目指し、2年次〜3年次にかけての時期に長期インターンシップ（開発系）へ参加することを強く推奨しています。また、時期を問わず、学外のハッカソンやIT系勉強会にも積極的に参加して、刺激を得ることを促しています。 ","date":"2016年8月22日","externalUrl":null,"permalink":"/studies/","section":"宮治研究室 / MyjLab","summary":" 教育の場としての研究室 # 当研究室では、研究室は教育の場と捉えて運営をしています。 単に研究や将来の仕事に必要な「技術・知識」を習得するだけでなく、エンジニアとしての思考法、課題へのアプローチ、そして伝え方を身につけることを重視しています。\n日々の発表（練習）や質疑応答、課題への取り組み、そして報告会・反省会といった実践的なイベントを通じて、マインドセットを養います。\n※現在、卒業研究では開発系のテーマに取り組むことを前提に学生を受け入れています（以前は文系的なテーマも受け入れていました）。\nゼミ（3年生） # 通年: 技術力の向上\n","title":"Studies","type":"page"},{"content":" 宮治 裕: MIYAJI, Yutaka 2026 年度メンバー 2025 年度メンバー 2024 年度メンバー 2023 年度メンバー 2022 年度メンバー 2021 年度メンバー 2020 年度メンバー 2019 年度メンバー 2018 年度メンバー 2017 年度メンバー 2016 年度メンバー 2015 年度メンバー 2014 年度メンバー 2013 年度メンバー 2012 年度メンバー 2011 年度メンバー 2010 年度メンバー ","date":"2016年8月22日","externalUrl":null,"permalink":"/members/","section":"宮治研究室 / MyjLab","summary":" 宮治 裕: MIYAJI, Yutaka 2026 年度メンバー 2025 年度メンバー 2024 年度メンバー 2023 年度メンバー 2022 年度メンバー 2021 年度メンバー 2020 年度メンバー 2019 年度メンバー 2018 年度メンバー 2017 年度メンバー 2016 年度メンバー 2015 年度メンバー 2014 年度メンバー 2013 年度メンバー 2012 年度メンバー 2011 年度メンバー 2010 年度メンバー ","title":"Members","type":"page"},{"content":" 宮治への連絡 # 宮治 裕(MIYAJI, Yutaka)\nE-Mail: uta[＠]si.aoyama.ac.jp\n所在地 # 〒 252-5258\n神奈川県相模原市中央区淵野辺 5−10-1\n青山学院大学相模原キャンパス O202c\nJR 横浜線 淵野辺駅（各駅停車）から正門まで徒歩 7 分\nMAP(相模原キャンパス キャンパスマップ 青山学院大学Web)\n","date":"2016年8月22日","externalUrl":null,"permalink":"/contact/","section":"宮治研究室 / MyjLab","summary":" 宮治への連絡 # 宮治 裕(MIYAJI, Yutaka)\nE-Mail: uta[＠]si.aoyama.ac.jp\n所在地 # 〒 252-5258\n神奈川県相模原市中央区淵野辺 5−10-1\n青山学院大学相模原キャンパス O202c\n","title":"Contact","type":"page"},{"content":"","date":"2019年8月30日","externalUrl":null,"permalink":"/m/","section":"Ms","summary":"","title":"Ms","type":"m"},{"content":" 宮治 裕 (MIYAJI Yutaka)\n(旧姓 大内)\n青山学院大学 社会情報学部 教授\n研究者情報（青山学院大学研究者情報システムへリンク）\nプロフィール（facebookへリンク）\nX (Xへリンク、学生さんに見てほしい情報をリポスト、引用ポストしています)\n面白いひとたちと面白いことをしたい\n好き：ガジェット，ハイテク，ネット，ロボット :)\n","date":"2019年8月30日","externalUrl":null,"permalink":"/m/yutakamiyaji/","section":"Ms","summary":" 宮治 裕 (MIYAJI Yutaka)\n(旧姓 大内)\n青山学院大学 社会情報学部 教授\n研究者情報（青山学院大学研究者情報システムへリンク）\nプロフィール（facebookへリンク）\nX (Xへリンク、学生さんに見てほしい情報をリポスト、引用ポストしています)\n面白いひとたちと面白いことをしたい\n好き：ガジェット，ハイテク，ネット，ロボット :)\n","title":"宮治 裕 の情報","type":"m"},{"content":" 社会や人間のためのシステム化 実世界とネットをつなぎ、様々なデータと情報技術を組み合わせて、社会や生活に役立つシステム（サービス）を実現します。 宮治研究室について 宮治研究室（宮治ゼミ）は、青山学院大学の社会情報学部に設置されています。 利用者向けの情報サービスシステムを、実装を通じて学ぶ実践型の研究室です。 社会や人間の問題を背景に、要件定義・アイデア出しを行った上で複数の技術を組み合わせ、 実際に利用できるシステムを構築し、その有用性を検証することを重視しています。 そのシステム化のためには、データ採取、データ分析・機械学習、情報提示・操作、通信・連携の4分野の技術を組み合わせることが必要です。 01 データ採取 Web、API、センサ、カメラ、スマートデバイスなどから情報を取得します。 02 データ分析・機械学習 統計、機械学習、ディープラーニングなどを用いて、 データから意味のある情報を取り出します。 03 情報提示・操作 可視化、スマートフォン、AR/VR、ゲームエンジン、 ロボットなどを活用します。 04 通信・連携 Web、クラウド、データベース、ネットワーク技術で、 各要素をひとつのシステムとして統合します。 研究室について詳しく見る → 研究テーマ 当研究室では、既存の枠組みにとらわれず多様な情報を活用すること、単一の技術に依存せず複合的なアプローチを採ること、そして「研究のための研究」に留まらず社会や人間の現実的な課題を解決するシステムを実装することを重視しています。 その適用領域は幅広く、過去の学生の研究テーマも多種多様であるのが特徴です。 過去の研究テーマ → 教育活動 当研究室は教育の場として位置づけています。 自ら主体的に学ぶ姿勢を重んじるのはもちろん、 上級生になるにつれて周囲を牽引し、 良い影響を与える力を身につけることを期待しています。 教育活動を見る → その他 メンバー情報 → 連絡先 → ","date":"2019年8月30日","externalUrl":null,"permalink":"/","section":"宮治研究室 / MyjLab","summary":" 社会や人間のためのシステム化 実世界とネットをつなぎ、様々なデータと情報技術を組み合わせて、社会や生活に役立つシステム（サービス）を実現します。 宮治研究室について 宮治研究室（宮治ゼミ）は、青山学院大学の社会情報学部に設置されています。 利用者向けの情報サービスシステムを、実装を通じて学ぶ実践型の研究室です。 社会や人間の問題を背景に、要件定義・アイデア出しを行った上で複数の技術を組み合わせ、 実際に利用できるシステムを構築し、その有用性を検証することを重視しています。 そのシステム化のためには、データ採取、データ分析・機械学習、情報提示・操作、通信・連携の4分野の技術を組み合わせることが必要です。 01 データ採取 Web、API、センサ、カメラ、スマートデバイスなどから情報を取得します。 02 データ分析・機械学習 統計、機械学習、ディープラーニングなどを用いて、 データから意味のある情報を取り出します。 03 情報提示・操作 可視化、スマートフォン、AR/VR、ゲームエンジン、 ロボットなどを活用します。 04 通信・連携 Web、クラウド、データベース、ネットワーク技術で、 各要素をひとつのシステムとして統合します。 研究室について詳しく見る → 研究テーマ 当研究室では、既存の枠組みにとらわれず多様な情報を活用すること、単一の技術に依存せず複合的なアプローチを採ること、そして「研究のための研究」に留まらず社会や人間の現実的な課題を解決するシステムを実装することを重視しています。 その適用領域は幅広く、過去の学生の研究テーマも多種多様であるのが特徴です。 ","title":"宮治研究室 / MyjLab","type":"page"},{"content":" 3 # ガッちゃん こういち アキラ うめちゃん かねごん KNMO きりし たかひこ チーフ じゅん まさ JNB こーへー はっせー ミシュラン FJI めつ しかちゃん ","date":"2016年8月22日","externalUrl":null,"permalink":"/m/2010members/","section":"Ms","summary":" 3 # ガッちゃん こういち アキラ うめちゃん かねごん KNMO きりし たかひこ チーフ じゅん まさ JNB こーへー はっせー ミシュラン FJI めつ しかちゃん ","title":"2010年度 メンバー","type":"m"},{"content":" 4 # ガッちゃん こういち アキラ うめちゃん かねごん KNMO きりし たかひこ チーフ じゅん まさ JNB こーへー めつ しかちゃん 3 # ちっひー kgっち だいちゃん くみし あねご つむつむ NMJ みなみ はまちゃん ふくちゃん えーちゃん ワッキー やなぎ ","date":"2016年8月22日","externalUrl":null,"permalink":"/m/2011members/","section":"Ms","summary":" 4 # ガッちゃん こういち アキラ うめちゃん かねごん KNMO きりし たかひこ チーフ じゅん まさ JNB こーへー めつ しかちゃん 3 # ちっひー kgっち だいちゃん くみし あねご つむつむ NMJ みなみ はまちゃん ふくちゃん えーちゃん ワッキー やなぎ ","title":"2011年度 メンバー","type":"m"},{"content":" B区分 # チェックイン型モバイルアプリケーションを用いたウェブサービスの構築 twitterによる情報取得システムの構築 タグ付けによる広告クリック誘引システム スマートフォンにおけるキャンパスナビゲーションシステムの構築　～GPS・ARを活用した+ 情報提示アプリ～ Kinectを用いた仮想試着システムの構築 NUIによる情報家電ネットワークの構築 エージェントによる相模原キャンパスにおける避難シミュレーション A区分 # ファッションオンラインショッピングにおけるマーケティングの成功要因 SNSにおけるセルフブランディング ソーシャルゲーム業界における日本企業の優位性と課題 災害時のソーシャルメディアのあり方 東日本大震災におけるインターネット業界の動向 日本の電子書籍市場が拡大するには AR（拡張現実感）を利用した技術とこれからの可能性 初心者へ向けたプログラミング教育の改善　-JavaScriptによるプログラミング授業設計- ","date":"2016年8月22日","externalUrl":null,"permalink":"/t/2011themes/","section":"Ts","summary":" B区分 # チェックイン型モバイルアプリケーションを用いたウェブサービスの構築 twitterによる情報取得システムの構築 タグ付けによる広告クリック誘引システム スマートフォンにおけるキャンパスナビゲーションシステムの構築　～GPS・ARを活用した+ 情報提示アプリ～ Kinectを用いた仮想試着システムの構築 NUIによる情報家電ネットワークの構築 エージェントによる相模原キャンパスにおける避難シミュレーション A区分 # ファッションオンラインショッピングにおけるマーケティングの成功要因 SNSにおけるセルフブランディング ソーシャルゲーム業界における日本企業の優位性と課題 災害時のソーシャルメディアのあり方 東日本大震災におけるインターネット業界の動向 日本の電子書籍市場が拡大するには AR（拡張現実感）を利用した技術とこれからの可能性 初心者へ向けたプログラミング教育の改善　-JavaScriptによるプログラミング授業設計- ","title":"2011年度 研究テーマ","type":"t"},{"content":" M # まさ 4 # はっせー FJI ちっひー kgっち だいちゃん くみし あねご つむつむ NMJ みなみ はまちゃん ふくちゃん えーちゃん ワッキー やなぎ 3 # あんちゃん UN すんさく のり おっくん キング KG たまちゃん てし あいちゃん ざきさん まるさま ぐっさん あやち ","date":"2016年8月22日","externalUrl":null,"permalink":"/m/2012members/","section":"Ms","summary":" M # まさ 4 # はっせー FJI ちっひー kgっち だいちゃん くみし あねご つむつむ NMJ みなみ はまちゃん ふくちゃん えーちゃん ワッキー やなぎ 3 # あんちゃん UN すんさく のり おっくん キング KG たまちゃん てし あいちゃん ざきさん まるさま ぐっさん あやち ","title":"2012年度 メンバー","type":"m"},{"content":" B区分 # HUNET ーFacebookのlike分析による人物マッチングシステムー 複数のUI実装によるスマートフォンアプリケーションのユーザビリティ分析 位置情報に基づく滞在情報管理システムの開発 社会情報学部生の履修分野を可視化するイラストジェネレータ A区分 # 利用者数推移から見るIT産業の流行加速度 音楽の理想的な価値と消費方法 オンラインショッピングの決済手段の実態 ーPayPalの日本での展望ー コンピュータゲームにおけるコミュニケーションの役割と展望 コミュニケーションツールとしてのSNSの現状と今後 Facebookページにおけるコミュニケーション量とページ認知度の関係性 高齢者のデジタルディバイド ーシニア向けSNSの提案ー 携帯メール利用時の顔文字における男女差の調査 再評価されるGIF動画　モバイル時代への調和 移住希望者と受け入れ地域を繋ぐシステムの提案 ウェアラブル・コンピュータがもたらす社会の変化 ","date":"2016年8月22日","externalUrl":null,"permalink":"/t/2012themes/","section":"Ts","summary":" B区分 # HUNET ーFacebookのlike分析による人物マッチングシステムー 複数のUI実装によるスマートフォンアプリケーションのユーザビリティ分析 位置情報に基づく滞在情報管理システムの開発 社会情報学部生の履修分野を可視化するイラストジェネレータ A区分 # 利用者数推移から見るIT産業の流行加速度 音楽の理想的な価値と消費方法 オンラインショッピングの決済手段の実態 ーPayPalの日本での展望ー コンピュータゲームにおけるコミュニケーションの役割と展望 コミュニケーションツールとしてのSNSの現状と今後 Facebookページにおけるコミュニケーション量とページ認知度の関係性 高齢者のデジタルディバイド ーシニア向けSNSの提案ー 携帯メール利用時の顔文字における男女差の調査 再評価されるGIF動画　モバイル時代への調和 移住希望者と受け入れ地域を繋ぐシステムの提案 ウェアラブル・コンピュータがもたらす社会の変化 ","title":"2012年度 研究テーマ","type":"t"},{"content":" M # まさ 4 # ミシュラン りさぴょす あんちゃん UN すんさく のり おっくん キング KG たまちゃん てし まるさま ぐっさん あやち 3 # ミキティ アミノサン ユーメイ，メイ エンヌ あづみ つよぽん ふみか しぶやん みほさん TBK NKOっち NKじー なっちゃん 会長 ふっきー つる ","date":"2016年8月22日","externalUrl":null,"permalink":"/m/2013members/","section":"Ms","summary":" M # まさ 4 # ミシュラン りさぴょす あんちゃん UN すんさく のり おっくん キング KG たまちゃん てし まるさま ぐっさん あやち 3 # ミキティ アミノサン ユーメイ，メイ エンヌ あづみ つよぽん ふみか しぶやん みほさん TBK NKOっち NKじー なっちゃん 会長 ふっきー つる ","title":"2013年度 メンバー","type":"m"},{"content":" M # Twitterを対象とした評価極性判定システムの構築 B区分 # Facebookのデータ分析によるスポット提示システムの構築 Twitterの感情極性分析による好感度調査手法の実装 高等学校共通教科「情報」における教育改善 -インタラクティブデジタル教材の提案・作成- 人々の「知りたい」を調べる検索システムの構築 使いやすい関係図作成・共有Webサービスの構築 演劇を見に行きたくなるWEBサービスの開発 ー日本の観劇数向上のためにー センサネットワークを用いた学内ナビゲーションシステムの構築 A区分 # 視覚障害者のタッチスクリーン端末利用について 重度肢体不自由者の介護活動におけるコミュニケーションシステムの提案 ICTによるFund-Rasingの可能性 インターネットにおける選挙運動の現状と課題 個人メディアとしてのソーシャルメディア スマートフォン向け学生ポータルサービスの提案 e-Learning を利用した情報教育についての一考察 ","date":"2016年8月22日","externalUrl":null,"permalink":"/t/2013themes/","section":"Ts","summary":" M # Twitterを対象とした評価極性判定システムの構築 B区分 # Facebookのデータ分析によるスポット提示システムの構築 Twitterの感情極性分析による好感度調査手法の実装 高等学校共通教科「情報」における教育改善 -インタラクティブデジタル教材の提案・作成- 人々の「知りたい」を調べる検索システムの構築 使いやすい関係図作成・共有Webサービスの構築 演劇を見に行きたくなるWEBサービスの開発 ー日本の観劇数向上のためにー センサネットワークを用いた学内ナビゲーションシステムの構築 A区分 # 視覚障害者のタッチスクリーン端末利用について 重度肢体不自由者の介護活動におけるコミュニケーションシステムの提案 ICTによるFund-Rasingの可能性 インターネットにおける選挙運動の現状と課題 個人メディアとしてのソーシャルメディア スマートフォン向け学生ポータルサービスの提案 e-Learning を利用した情報教育についての一考察 ","title":"2013年度 研究テーマ","type":"t"},{"content":" M # おっくん ぐっさん 4 # ざきさん ミキティ アミノサン ユーメイ，メイ エンヌ あづみ つよぽん ふみか みゆみゆ しぶやん みほさん TBK NKOっち NKじー なっちゃん 会長 ふっきー つる P山さん 3 # かえん かずさ さっさん てぃら たくや せいしろ ジョビー にいみん ブッチー みっつん りなりな ちーくん ","date":"2016年8月22日","externalUrl":null,"permalink":"/m/2014members/","section":"Ms","summary":" M # おっくん ぐっさん 4 # ざきさん ミキティ アミノサン ユーメイ，メイ エンヌ あづみ つよぽん ふみか みゆみゆ しぶやん みほさん TBK NKOっち NKじー なっちゃん 会長 ふっきー つる P山さん 3 # かえん かずさ さっさん てぃら たくや せいしろ ジョビー にいみん ブッチー みっつん りなりな ちーくん ","title":"2014年度 メンバー","type":"m"},{"content":" B区分 # iBeaconを用いた出席管理システムの構築 ビーコンルームにおける位置情報提示システム ファッション系統に基づくレコメンデーションシステム フォローネットワークから探るTwitterの中心人物 −中心性と被リツイート数の関係− Oculus Rift を利用した VR ゴルフ体験型アプリケーションの開発 ウェアラブルデバイスと拡張現実感による広告展示・購買システム 博物館におけるセンサーデバイスを用いた体感型展示システムの開発 スマートツーリズム構想に基づく観光誘致カメラアプリケーション プロジェクションマッピングと Kinect による店頭ディスプレイ用アプリケーションの構築 視覚障害者に配慮したタッチデバイス・アプリの操作性の検証 情報セキュリティリテラシ向上のための不正アクセス可視化システムの構築 複数の視点で Twitter の「つぶやき」を振り返るウェブサービスの構築 掲示板型SNSサービスの構築 −話題の繋がりから人の繋がりを作るSNS− 行政機関のコールセンターにおけるFAQの分析・改善 −町田市役所を事例に− A区分 # SNSの効用に関する考察 −若者のLINE・Twitter・Facebookの利用動機 Webメディアにおけるクオリティ低下問題の改善策 女性就業促進に関する考察 −テレワークと海外事例からの提案− 2020 東京オリンピック開催に向けた ICT を用いたマーケティング戦略 艦隊これくしょん−艦これ−から見るオンラインゲームがヒットする要因 ","date":"2016年8月22日","externalUrl":null,"permalink":"/t/2014themes/","section":"Ts","summary":" B区分 # iBeaconを用いた出席管理システムの構築 ビーコンルームにおける位置情報提示システム ファッション系統に基づくレコメンデーションシステム フォローネットワークから探るTwitterの中心人物 −中心性と被リツイート数の関係− Oculus Rift を利用した VR ゴルフ体験型アプリケーションの開発 ウェアラブルデバイスと拡張現実感による広告展示・購買システム 博物館におけるセンサーデバイスを用いた体感型展示システムの開発 スマートツーリズム構想に基づく観光誘致カメラアプリケーション プロジェクションマッピングと Kinect による店頭ディスプレイ用アプリケーションの構築 視覚障害者に配慮したタッチデバイス・アプリの操作性の検証 情報セキュリティリテラシ向上のための不正アクセス可視化システムの構築 複数の視点で Twitter の「つぶやき」を振り返るウェブサービスの構築 掲示板型SNSサービスの構築 −話題の繋がりから人の繋がりを作るSNS− 行政機関のコールセンターにおけるFAQの分析・改善 −町田市役所を事例に− A区分 # SNSの効用に関する考察 −若者のLINE・Twitter・Facebookの利用動機 Webメディアにおけるクオリティ低下問題の改善策 女性就業促進に関する考察 −テレワークと海外事例からの提案− 2020 東京オリンピック開催に向けた ICT を用いたマーケティング戦略 艦隊これくしょん−艦これ−から見るオンラインゲームがヒットする要因 ","title":"2014年度 研究テーマ","type":"t"},{"content":" M # おっくん ぐっさん 会長 ふみか 4 # かえん かずさ さっさん てぃら たくや せいしろ ジョビー にいみん ブッチー みっつん りなりな ちーくん 3 # やぎちゃん おいちゃん ダイソン ほのか げすこ さっし しもやん ゆかぽん アレン あやか ","date":"2016年8月22日","externalUrl":null,"permalink":"/m/2015members/","section":"Ms","summary":" M # おっくん ぐっさん 会長 ふみか 4 # かえん かずさ さっさん てぃら たくや せいしろ ジョビー にいみん ブッチー みっつん りなりな ちーくん 3 # やぎちゃん おいちゃん ダイソン ほのか げすこ さっし しもやん ゆかぽん アレン あやか ","title":"2015年度 メンバー","type":"m"},{"content":" M # 利用者の行動状況に基づく情報提案システムの構築 インターネットサービスを主軸としたIT企業の業務に基づく実践的ソフトウェア開発実習 B # iBeaconを用いた滞在時間と個人の興味データに基づく観光地推薦システム Twitterデータに基づく関心事項提示システム 写真のExif情報を利用した観光推薦システム Word Cloud を用いたメディアの話題度閲覧システム Microsoft Azureを用いた多ジャンル推薦システム Twitterの共通一般ユーザの情報を利用したフォロー推薦の有効性 Kinect によるダンス初心者習得支援システム スクワットによる筋力低下予防を目的とした高齢者向けアプリケーションの構築 拡張現実感による校外学習用アプリケーションの開発 ","date":"2016年8月22日","externalUrl":null,"permalink":"/t/2015themes/","section":"Ts","summary":" M # 利用者の行動状況に基づく情報提案システムの構築 インターネットサービスを主軸としたIT企業の業務に基づく実践的ソフトウェア開発実習 B # iBeaconを用いた滞在時間と個人の興味データに基づく観光地推薦システム Twitterデータに基づく関心事項提示システム 写真のExif情報を利用した観光推薦システム Word Cloud を用いたメディアの話題度閲覧システム Microsoft Azureを用いた多ジャンル推薦システム Twitterの共通一般ユーザの情報を利用したフォロー推薦の有効性 Kinect によるダンス初心者習得支援システム スクワットによる筋力低下予防を目的とした高齢者向けアプリケーションの構築 拡張現実感による校外学習用アプリケーションの開発 ","title":"2015年度 研究テーマ","type":"t"},{"content":" M # 会長 ふみか かえん せいしろ みっつん 4 # やぎちゃん おいちゃん ダイソン ほのか げすこ さっし しもやん ジョビー ゆかぽん アレン あやか 3 # てでぃ いでし りばい りんたろ ぼりさん よーさん しょーたい ますみ らぐち ヨッシー ","date":"2016年8月22日","externalUrl":null,"permalink":"/m/2016members/","section":"Ms","summary":" M # 会長 ふみか かえん せいしろ みっつん 4 # やぎちゃん おいちゃん ダイソン ほのか げすこ さっし しもやん ジョビー ゆかぽん アレン あやか 3 # てでぃ いでし りばい りんたろ ぼりさん よーさん しょーたい ますみ らぐち ヨッシー ","title":"2016年度 メンバー","type":"m"},{"content":" M # word2vecを用いた連想検索可視化システムの構築 カメラ及びBeacon技術を用いた移動履歴生成システムの構築 B # ユーザの行動履歴を用いたスポット推薦システムの構築 宿泊レビューにおける評価視点ごとの評判の可視化と相対的特徴抽出 商品選択における訴求要素の分析 Twitterにおける潜在的インフルエンサの抽出と影響ジャンルの推定 SVMを用いたツイート分析によるユーザの生活圏推定 ツイートの共起頻度による話題変遷の可視化 Twitterにおける東京都の多言語混在状況の分布抽出と可視化 流行の発生と収束に関する時系列分析〜Twitter と Google を比較して〜 ビーコンを用いた屋内環境における視覚障害者歩行支援システムの構築 小説の印象に応じた背景音楽の自動生成システムの構築 社会情報学部への興味を高めるためのインタラクティブ・デジタルサイネージ ","date":"2016年8月22日","externalUrl":null,"permalink":"/t/2016themes/","section":"Ts","summary":" M # word2vecを用いた連想検索可視化システムの構築 カメラ及びBeacon技術を用いた移動履歴生成システムの構築 B # ユーザの行動履歴を用いたスポット推薦システムの構築 宿泊レビューにおける評価視点ごとの評判の可視化と相対的特徴抽出 商品選択における訴求要素の分析 Twitterにおける潜在的インフルエンサの抽出と影響ジャンルの推定 SVMを用いたツイート分析によるユーザの生活圏推定 ツイートの共起頻度による話題変遷の可視化 Twitterにおける東京都の多言語混在状況の分布抽出と可視化 流行の発生と収束に関する時系列分析〜Twitter と Google を比較して〜 ビーコンを用いた屋内環境における視覚障害者歩行支援システムの構築 小説の印象に応じた背景音楽の自動生成システムの構築 社会情報学部への興味を高めるためのインタラクティブ・デジタルサイネージ ","title":"2016年度 研究テーマ","type":"t"},{"content":" M # かえん せいしろ みっつん おいちゃん しもやん 4 # いでし りばい りんたろ ぼりさん よーさん しょーたい ますみ らぐち ヨッシー 3 # ゆうき さかわし たな もなが もも しょうご れお まるたく ざき ドラゴン ","date":"2016年8月22日","externalUrl":null,"permalink":"/m/2017members/","section":"Ms","summary":" M # かえん せいしろ みっつん おいちゃん しもやん 4 # いでし りばい りんたろ ぼりさん よーさん しょーたい ますみ らぐち ヨッシー 3 # ゆうき さかわし たな もなが もも しょうご れお まるたく ざき ドラゴン ","title":"2017年度 メンバー","type":"m"},{"content":" M # ウェアラブルデバイスと機械学習を用いたメンタルヘルス推定 機械学習を利用したパケットキャプチャデータによる悪性通信検知検知システム B # 中高バレー部を対象としたゲームデータ分析システム 大学テニス選手における打球の特徴判別と改善 Unityを用いたマルチエージェントシミュレーション 複数カメラによる3Dモデリングを用いた人物追跡システム PCワークの進捗監視システム ユーザレビューを用いたコミックレコメンドシステム 高齢者自立支援のためのリハビリ進捗自動管理 仮想現実を利用したプレゼンテーション練習システム 印象に基づいたフォント提案 ","date":"2016年8月22日","externalUrl":null,"permalink":"/t/2017themes/","section":"Ts","summary":" M # ウェアラブルデバイスと機械学習を用いたメンタルヘルス推定 機械学習を利用したパケットキャプチャデータによる悪性通信検知検知システム B # 中高バレー部を対象としたゲームデータ分析システム 大学テニス選手における打球の特徴判別と改善 Unityを用いたマルチエージェントシミュレーション 複数カメラによる3Dモデリングを用いた人物追跡システム PCワークの進捗監視システム ユーザレビューを用いたコミックレコメンドシステム 高齢者自立支援のためのリハビリ進捗自動管理 仮想現実を利用したプレゼンテーション練習システム 印象に基づいたフォント提案 ","title":"2017年度 研究テーマ","type":"t"},{"content":" M # かえん おいちゃん しもやん ぼりさん 4 # ゆうき さかわし たな もなが もも しょうご まるたく ざき ドラゴン 3 # ハンニバル いのっち キャナやん みなこ(テイラー) KAZ ゆうたろう すだれさま あやっほ デイジー まな ヒロ ","date":"2016年8月22日","externalUrl":null,"permalink":"/m/2018members/","section":"Ms","summary":" M # かえん おいちゃん しもやん ぼりさん 4 # ゆうき さかわし たな もなが もも しょうご まるたく ざき ドラゴン 3 # ハンニバル いのっち キャナやん みなこ(テイラー) KAZ ゆうたろう すだれさま あやっほ デイジー まな ヒロ ","title":"2018年度 メンバー","type":"m"},{"content":" M # 文章ベクトルを用いた色彩選択システム 目的に応じた適切な人物動作認識手法の検討 ニュースにおける特徴語の副次的意味変遷可視化システム構築 B # HMDを用いた聴覚障がい者のための音声情報提示システム 自動撮影・記録によるコーディネート管理支援システム 住居内行動把握のための動画記録システム 視線移動の抑制による速読システム 複数ユーザの嗜好に応じた楽曲レコメンデーションシステム 一人暮らしの栄養バランスを考慮した料理レシピ支援システム 自然言語処理を用いたコンテンツ作品のクロスドメイン推薦 位置情報と時間帯情報を用いたスポットレコメンデーションシステム 観光レビューを利用した高好感度観光地レコメンデーションシステム ","date":"2016年8月22日","externalUrl":null,"permalink":"/t/2018themes/","section":"Ts","summary":" M # 文章ベクトルを用いた色彩選択システム 目的に応じた適切な人物動作認識手法の検討 ニュースにおける特徴語の副次的意味変遷可視化システム構築 B # HMDを用いた聴覚障がい者のための音声情報提示システム 自動撮影・記録によるコーディネート管理支援システム 住居内行動把握のための動画記録システム 視線移動の抑制による速読システム 複数ユーザの嗜好に応じた楽曲レコメンデーションシステム 一人暮らしの栄養バランスを考慮した料理レシピ支援システム 自然言語処理を用いたコンテンツ作品のクロスドメイン推薦 位置情報と時間帯情報を用いたスポットレコメンデーションシステム 観光レビューを利用した高好感度観光地レコメンデーションシステム ","title":"2018年度 研究テーマ","type":"t"},{"content":" M # ぼりさん さかわし しょうご まるたく 4 # れお キャナやん みなこ KAZ ゆうたろう すだれさま あやっほ デイジー まな ヒロ 3 # ガッキー いとっち いっきゅう りく サッチー あやか まさき るんるん（かける） ちばちゃん ミイミ はるの \u0026ndash;\nコッペ ソウ ","date":"2016年8月22日","externalUrl":null,"permalink":"/m/2019members/","section":"Ms","summary":" M # ぼりさん さかわし しょうご まるたく 4 # れお キャナやん みなこ KAZ ゆうたろう すだれさま あやっほ デイジー まな ヒロ 3 # ガッキー いとっち いっきゅう りく サッチー あやか まさき るんるん（かける） ちばちゃん ミイミ はるの –\n","title":"2019年度 メンバー","type":"m"},{"content":" M # 単語ベクトルを用いた潜在的共通項可視化システム B # Doc2Vec を用いた楽曲に適した色彩推薦システム 各政党活動の視覚化による思考支援 黄金比率に基づくメイクアップ支援システム OpenPose を用いた阿波踊りの定量的評価 趣味嗜好の異なる相手とのコミュニケーション支援ツール 拡張現実(AR)における空間共有を用いた情報提示システム 3D キャラクターとの表情コミュニケーションプラットフォーム 歌詞情報に基づく状況に応じた楽曲推薦システム ","date":"2016年8月22日","externalUrl":null,"permalink":"/t/2019themes/","section":"Ts","summary":" M # 単語ベクトルを用いた潜在的共通項可視化システム B # Doc2Vec を用いた楽曲に適した色彩推薦システム 各政党活動の視覚化による思考支援 黄金比率に基づくメイクアップ支援システム OpenPose を用いた阿波踊りの定量的評価 趣味嗜好の異なる相手とのコミュニケーション支援ツール 拡張現実(AR)における空間共有を用いた情報提示システム 3D キャラクターとの表情コミュニケーションプラットフォーム 歌詞情報に基づく状況に応じた楽曲推薦システム ","title":"2019年度 研究テーマ","type":"t"},{"content":" M # さかわし しょうご まるたく 4 # KAZ ゆうたろ いとっち いっきゅう サッチー あやか まさき ちばちゃん ミイミ はるの 3 # ソウ おかじゅん まっさん モフィ ばんちょ さまた てる ちゃんりな まる そむ おいちゃん えりな ガッキー りく るんるん（かける） ","date":"2016年8月22日","externalUrl":null,"permalink":"/m/2020members/","section":"Ms","summary":" M # さかわし しょうご まるたく 4 # KAZ ゆうたろ いとっち いっきゅう サッチー あやか まさき ちばちゃん ミイミ はるの 3 # ソウ おかじゅん まっさん モフィ ばんちょ さまた てる ちゃんりな まる そむ おいちゃん えりな ガッキー りく るんるん（かける） ","title":"2020年度 メンバー","type":"m"},{"content":" M # 感性語に着目した文章ベクトルによるコンテンツ作品のクロスドメイン推薦 学術論文のトピックを用いた論文検索システム B # 視覚障害者向け周辺情報提示システム レビュー情報を基にした抽象度の高いニーズに対する書籍推薦システム レビュー文の可視化による商品選択支援 ３ D モデルで構成されたヴァーチャルキャンパス 感情可視化機能を搭載した iCBT-AI システム Twitter におけるデマ拡散抑制システム 仮想空間でのプレゼントレーニングツール ツイートデータを用いた精神状態と生活習慣の可視化システム 災害時を想定した個人の備蓄を促すシステム リアルタイム監視による不正ログイン検知システム ","date":"2016年8月22日","externalUrl":null,"permalink":"/t/2020themes/","section":"Ts","summary":" M # 感性語に着目した文章ベクトルによるコンテンツ作品のクロスドメイン推薦 学術論文のトピックを用いた論文検索システム B # 視覚障害者向け周辺情報提示システム レビュー情報を基にした抽象度の高いニーズに対する書籍推薦システム レビュー文の可視化による商品選択支援 ３ D モデルで構成されたヴァーチャルキャンパス 感情可視化機能を搭載した iCBT-AI システム Twitter におけるデマ拡散抑制システム 仮想空間でのプレゼントレーニングツール ツイートデータを用いた精神状態と生活習慣の可視化システム 災害時を想定した個人の備蓄を促すシステム リアルタイム監視による不正ログイン検知システム ","title":"2020年度 研究テーマ","type":"t"},{"content":" M # サッチー ちばちゃん みいみ 4 # カッキー ソウ りく おかじゅん まっさん モフィ ばんちょ smt てる ちゃんりな まる そむ おいちゃん えりな 3 # れん okr ららぴー かいせい おぜ くどちゃん ししょう セイ まさ のぶ れなねい ゆず こまゆ ","date":"2016年8月22日","externalUrl":null,"permalink":"/m/2021members/","section":"Ms","summary":" M # サッチー ちばちゃん みいみ 4 # カッキー ソウ りく おかじゅん まっさん モフィ ばんちょ smt てる ちゃんりな まる そむ おいちゃん えりな 3 # れん okr ららぴー かいせい おぜ くどちゃん ししょう セイ まさ のぶ れなねい ゆず こまゆ ","title":"2021年度 メンバー","type":"m"},{"content":" M # 視覚障害者向け物体・文字情報提示システム 機械学習によるうつ病へのアプローチ B # 映画予告動画を用いた映画推薦システムの提案 YouTube のチャンネルメンバーシップに関する研究 文章のコサイン類似度を利用した植物推薦システム 人体モデルを用いたオンライン仮想試着システム ユーザが指定する状況と感情を考慮した映画推薦システムの構築 Twitter データに基づく関心事項の提示によるコミュニケーション継続支援システム 3DCG を用いたバーチャルオープンキャンパス 不快情報の非表示制御可能SNS LINE bot を用いた英語語彙学習習慣化システム 有価証券報告書「事業等のリスク」を用いた就職活動支援システム DBpedia の社会的なつながりを活用した音楽アーティストの推薦 YouTube の再生リストと動画タグを用いた動画推薦手法 Web 検索結果のリンク構造可視化システム -PLSA とMAP 推定を用いた日本語歌詞の印象推定手法の評価―感性空間を用いたユーザの気分に合う楽曲推薦システムの開発に向けて― ","date":"2016年8月22日","externalUrl":null,"permalink":"/t/2021themes/","section":"Ts","summary":" M # 視覚障害者向け物体・文字情報提示システム 機械学習によるうつ病へのアプローチ B # 映画予告動画を用いた映画推薦システムの提案 YouTube のチャンネルメンバーシップに関する研究 文章のコサイン類似度を利用した植物推薦システム 人体モデルを用いたオンライン仮想試着システム ユーザが指定する状況と感情を考慮した映画推薦システムの構築 Twitter データに基づく関心事項の提示によるコミュニケーション継続支援システム 3DCG を用いたバーチャルオープンキャンパス 不快情報の非表示制御可能SNS LINE bot を用いた英語語彙学習習慣化システム 有価証券報告書「事業等のリスク」を用いた就職活動支援システム DBpedia の社会的なつながりを活用した音楽アーティストの推薦 YouTube の再生リストと動画タグを用いた動画推薦手法 Web 検索結果のリンク構造可視化システム -PLSA とMAP 推定を用いた日本語歌詞の印象推定手法の評価―感性空間を用いたユーザの気分に合う楽曲推薦システムの開発に向けて― ","title":"2021年度 研究テーマ","type":"t"},{"content":" M # サッチー ソウ ちゃんりな もぃ 4 # れん okr おぜ くどちゃん ししょう セイ まさ のぶ れなねい ゆず こまゆ 3 # カイセイ イージー はやと UR あすみ なおき たくみ マッキー よしき あおば ひいろ サカス ももやま まひろん ","date":"2016年8月22日","externalUrl":null,"permalink":"/m/2022members/","section":"Ms","summary":" M # サッチー ソウ ちゃんりな もぃ 4 # れん okr おぜ くどちゃん ししょう セイ まさ のぶ れなねい ゆず こまゆ 3 # カイセイ イージー はやと UR あすみ なおき たくみ マッキー よしき あおば ひいろ サカス ももやま まひろん ","title":"2022年度 メンバー","type":"m"},{"content":" M # セルフケアと継続使⽤による精神疾患予防システム B # 中等教育におけるアクティブ・ラーニング型授業支援システム ロケーションベースARを活用した「聖地巡礼」を支援するフォトラリーシステムの開発 アニメを利用した日本語会話技能学習支援システム 献立における選択のストレスを軽減するレシピ検索システム 移動および固定ノードによる無線位置測定を用いたAR情報提供システム サーバー構築に必要なネットワーク知識学習の為の演習システム ゲーミフィケーションによる20代の運動習慣向上wo支援するシステム 聴覚障害者の会話参加時におけるコミュニケーション支援システム ミッションステートメントなどを用いた企業推薦システム ライブ生配信におけるインタラクティブ演出システム オンラインコミュニケーションにおける2種類の能動型質問ボットシステム ","date":"2016年8月22日","externalUrl":null,"permalink":"/t/2022themes/","section":"Ts","summary":" M # セルフケアと継続使⽤による精神疾患予防システム B # 中等教育におけるアクティブ・ラーニング型授業支援システム ロケーションベースARを活用した「聖地巡礼」を支援するフォトラリーシステムの開発 アニメを利用した日本語会話技能学習支援システム 献立における選択のストレスを軽減するレシピ検索システム 移動および固定ノードによる無線位置測定を用いたAR情報提供システム サーバー構築に必要なネットワーク知識学習の為の演習システム ゲーミフィケーションによる20代の運動習慣向上wo支援するシステム 聴覚障害者の会話参加時におけるコミュニケーション支援システム ミッションステートメントなどを用いた企業推薦システム ライブ生配信におけるインタラクティブ演出システム オンラインコミュニケーションにおける2種類の能動型質問ボットシステム ","title":"2022年度 研究テーマ","type":"t"},{"content":" M # ソウ ちゃんりな もぃ セイ ももちゃん HK 4 # カイセイ イージー はやと UR あすみ なおき たくみ マッキー よしき あおば ひいろ サカス ももやま 3 # そうま さっしー あかり みほさん まほすけ だいご なつき なな うのちゃん ゆいと こうた ゆな KEC ","date":"2016年8月22日","externalUrl":null,"permalink":"/m/2023members/","section":"Ms","summary":" M # ソウ ちゃんりな もぃ セイ ももちゃん HK 4 # カイセイ イージー はやと UR あすみ なおき たくみ マッキー よしき あおば ひいろ サカス ももやま 3 # そうま さっしー あかり みほさん まほすけ だいご なつき なな うのちゃん ゆいと こうた ゆな KEC ","title":"2023年度 メンバー","type":"m"},{"content":" M # 訪日観光客を対象とした風水害注意情報提供システム 言葉を用いた癒しシステム 知識ベース歌手推薦システムの研究：ネットワークグラフの活用 B # 偽ECサイト被害撲滅のためのセキュリティ学習システム 人的負担軽減のためのRFIDを用いたタイムトライヤル全自動ラップ計測 運動時の記憶力向上を利用した英単語学習アプリ 聴覚障がい者向け複数人会話支援システム 動画像解析によるプレゼンテーション自己修正支援システム ECサイトでの購買支援のための商品レビュー可視化システム VRを用いたストレスに対するリラクゼーション空間の作成 データサイエンスにおける前処理の学習支援システム プログラミング教育におけるAIチューターの開発 初学者向け論文読解支援システム カロリー記録アプリの「面倒くさい」を解決するレシート読取システム 学内での新たな出会い・繋がりを増やすマッチングシステム PLATEAUのオープンデータを用いたVRマップ ","date":"2016年8月22日","externalUrl":null,"permalink":"/t/2023themes/","section":"Ts","summary":" M # 訪日観光客を対象とした風水害注意情報提供システム 言葉を用いた癒しシステム 知識ベース歌手推薦システムの研究：ネットワークグラフの活用 B # 偽ECサイト被害撲滅のためのセキュリティ学習システム 人的負担軽減のためのRFIDを用いたタイムトライヤル全自動ラップ計測 運動時の記憶力向上を利用した英単語学習アプリ 聴覚障がい者向け複数人会話支援システム 動画像解析によるプレゼンテーション自己修正支援システム ECサイトでの購買支援のための商品レビュー可視化システム VRを用いたストレスに対するリラクゼーション空間の作成 データサイエンスにおける前処理の学習支援システム プログラミング教育におけるAIチューターの開発 初学者向け論文読解支援システム カロリー記録アプリの「面倒くさい」を解決するレシート読取システム 学内での新たな出会い・繋がりを増やすマッチングシステム PLATEAUのオープンデータを用いたVRマップ ","title":"2023年度 研究テーマ","type":"t"},{"content":" D # しょーご M # セイ ももちゃん HK UR よしき 4 # そうま さっしー あかり みほさん まほすけ だいご なつき なな うのちゃん ゆいと こうた ゆな KEC 3 # まるしょ かなえ ゆい まお せいご めぐ しん なっちゃん どんちゃん そう りほ じぇい ","date":"2016年8月22日","externalUrl":null,"permalink":"/m/2024members/","section":"Ms","summary":" D # しょーご M # セイ ももちゃん HK UR よしき 4 # そうま さっしー あかり みほさん まほすけ だいご なつき なな うのちゃん ゆいと こうた ゆな KEC 3 # まるしょ かなえ ゆい まお せいご めぐ しん なっちゃん どんちゃん そう りほ じぇい ","title":"2024年度 メンバー","type":"m"},{"content":" M # 初心者の鑑賞体験を深化させる対話型鑑賞支援システム SLAMとUWBによるセマンティック情報を保持できるARコラボレーションシステム B # ゲーミフィケーションを適用した英語発音学習支援システム 音響効果を用いた視覚障がい児向けダンス促進システム 自転車運転安全意識向上のヒヤリハットシステム 即時フィードバック機能を備えた統計反復学習システム ⾼齢者にとって使いやすい飲⾷店セルフオーダーシステム セレンディピティを考慮した楽曲推薦システム 若年層に向けた会話促進2Dメタバース 聴覚障がい者向け音楽可視化システム プロジェクションマッピングを用いたインタラクティブなジグソーパズル モーションキャプチャを用いた競技ダンスのホールド維持支援システム 意欲向上のためのARによる歴史学習支援システム 観光ルートを主眼としたSNSによる旅行計画支援システム 関連語とユーザ語彙ネットワークの可視化を用いた英単語学習システム ","date":"2016年8月22日","externalUrl":null,"permalink":"/t/2024themes/","section":"Ts","summary":" M # 初心者の鑑賞体験を深化させる対話型鑑賞支援システム SLAMとUWBによるセマンティック情報を保持できるARコラボレーションシステム B # ゲーミフィケーションを適用した英語発音学習支援システム 音響効果を用いた視覚障がい児向けダンス促進システム 自転車運転安全意識向上のヒヤリハットシステム 即時フィードバック機能を備えた統計反復学習システム ⾼齢者にとって使いやすい飲⾷店セルフオーダーシステム セレンディピティを考慮した楽曲推薦システム 若年層に向けた会話促進2Dメタバース 聴覚障がい者向け音楽可視化システム プロジェクションマッピングを用いたインタラクティブなジグソーパズル モーションキャプチャを用いた競技ダンスのホールド維持支援システム 意欲向上のためのARによる歴史学習支援システム 観光ルートを主眼としたSNSによる旅行計画支援システム 関連語とユーザ語彙ネットワークの可視化を用いた英単語学習システム ","title":"2024年度 研究テーマ","type":"t"},{"content":" D # しょーご M # UR よしき そうま さっしー 4 # まるしょ かなえ ゆい まお せいご めぐ しん なっちゃん どんちゃん そう りほし じぇい 3 # かえ かほ かいちょ こう しょうたろ たかひろ なお まつたけ えいと よっしー りき そーし そらち まさや ","date":"2016年8月22日","externalUrl":null,"permalink":"/m/2025members/","section":"Ms","summary":" D # しょーご M # UR よしき そうま さっしー 4 # まるしょ かなえ ゆい まお せいご めぐ しん なっちゃん どんちゃん そう りほし じぇい 3 # かえ かほ かいちょ こう しょうたろ たかひろ なお まつたけ えいと よっしー りき そーし そらち まさや ","title":"2025年度 メンバー","type":"m"},{"content":" M # 感性語に着目した文章ベクトルによるコンテンツ作品のクロスドメイン推薦 学術論文のトピックを用いた論文検索システム B # 視線・表情・うなずき・あいづち解析による聞き手行動改善支援システム ECサイトでの商品選択をサポートするための性別・年代推定システム 音楽的嗜好に基づく友達作りのためのマッチングシステム 先延ばし行動防止の為の位置測位によるスマホ利用制限リマインダー 楽しさを重視した高齢の麻雀初学者学習システム 瞬目解析による目の疲労検出と休憩誘導システム シミュレーションゲーム要素による防災備蓄学習システム 自己トレーニングにおける姿勢矯正のための視覚的フィードバックシステム 美術教養の普及を目指した美術史学習システム AI参加者とフィードバックによるファシリテーション手法練習システム 例文・画像を生成する語彙学習自作型デジタルフラッシュカード L1知識に基づくリアルタイムフィードバックを備えた英語ライティング支援システム ","date":"2016年8月22日","externalUrl":null,"permalink":"/t/2025themes/","section":"Ts","summary":" M # 感性語に着目した文章ベクトルによるコンテンツ作品のクロスドメイン推薦 学術論文のトピックを用いた論文検索システム B # 視線・表情・うなずき・あいづち解析による聞き手行動改善支援システム ECサイトでの商品選択をサポートするための性別・年代推定システム 音楽的嗜好に基づく友達作りのためのマッチングシステム 先延ばし行動防止の為の位置測位によるスマホ利用制限リマインダー 楽しさを重視した高齢の麻雀初学者学習システム 瞬目解析による目の疲労検出と休憩誘導システム シミュレーションゲーム要素による防災備蓄学習システム 自己トレーニングにおける姿勢矯正のための視覚的フィードバックシステム 美術教養の普及を目指した美術史学習システム AI参加者とフィードバックによるファシリテーション手法練習システム 例文・画像を生成する語彙学習自作型デジタルフラッシュカード L1知識に基づくリアルタイムフィードバックを備えた英語ライティング支援システム ","title":"2025年度 研究テーマ","type":"t"},{"content":" D # しょーご M # そうま さっしー 4 # かえ かほ かいちょ こう しょうたろ たかひろ なお まつたけ えいと よっしー りき そーし そらち まさや 3 # そら いけ かわしゅん くろむ なつ ひかる やすほ ゆうだい りくちゃん ニキ なおき ","date":"2016年8月22日","externalUrl":null,"permalink":"/m/2026members/","section":"Ms","summary":" D # しょーご M # そうま さっしー 4 # かえ かほ かいちょ こう しょうたろ たかひろ なお まつたけ えいと よっしー りき そーし そらち まさや 3 # そら いけ かわしゅん くろむ なつ ひかる やすほ ゆうだい りくちゃん ニキ なおき ","title":"2026年度 メンバー","type":"m"},{"content":"","date":"2016年8月22日","externalUrl":null,"permalink":"/t/","section":"Ts","summary":"","title":"Ts","type":"t"},{"content":"","date":"2015年10月10日","externalUrl":null,"permalink":"/blog/","section":"Blogs","summary":"","title":"Blogs","type":"blog"},{"content":"","date":"2015年10月10日","externalUrl":null,"permalink":"/categories/","section":"Categories","summary":"","title":"Categories","type":"categories"},{"content":"","date":"2015年10月10日","externalUrl":null,"permalink":"/tags/ipsum/","section":"Tags","summary":"","title":"Ipsum","type":"tags"},{"content":"","date":"2015年10月10日","externalUrl":null,"permalink":"/categories/lorem/","section":"Categories","summary":"","title":"Lorem","type":"categories"},{"content":" Move static content to static # Jekyll has a rule that any directory not starting with _ will be copied as-is to the _site output. Hugo keeps all static content under static. You should therefore move it all there. With Jekyll, something that looked like\n▾ \u0026lt;root\u0026gt;/ ▾ images/ logo.png should become\n▾ \u0026lt;root\u0026gt;/ ▾ static/ ▾ images/ logo.png Additionally, you\u0026rsquo;ll want any files that should reside at the root (such as CNAME) to be moved to static.\nCreate your Hugo configuration file # Hugo can read your configuration as JSON, YAML or TOML. Hugo supports parameters custom configuration too. Refer to the Hugo configuration documentation for details.\nSet your configuration publish folder to _site # The default is for Jekyll to publish to _site and for Hugo to publish to public. If, like me, you have _site mapped to a git submodule on the gh-pages branch, you\u0026rsquo;ll want to do one of two alternatives:\nChange your submodule to point to map gh-pages to public instead of _site (recommended).\ngit submodule deinit _site git rm _site git submodule add -b gh-pages git@github.com:your-username/your-repo.git public Or, change the Hugo configuration to use _site instead of public.\n{ .. \u0026quot;publishdir\u0026quot;: \u0026quot;_site\u0026quot;, .. } Convert Jekyll templates to Hugo templates # That\u0026rsquo;s the bulk of the work right here. The documentation is your friend. You should refer to Jekyll\u0026rsquo;s template documentation if you need to refresh your memory on how you built your blog and Hugo\u0026rsquo;s template to learn Hugo\u0026rsquo;s way.\nAs a single reference data point, converting my templates for heyitsalex.net took me no more than a few hours.\nConvert Jekyll plugins to Hugo shortcodes # Jekyll has plugins; Hugo has shortcodes. It\u0026rsquo;s fairly trivial to do a port.\nImplementation # As an example, I was using a custom image_tag plugin to generate figures with caption when running Jekyll. As I read about shortcodes, I found Hugo had a nice built-in shortcode that does exactly the same thing.\nJekyll\u0026rsquo;s plugin:\nmodule Jekyll class ImageTag \u0026lt; Liquid::Tag @url = nil @caption = nil @class = nil @link = nil // Patterns IMAGE_URL_WITH_CLASS_AND_CAPTION = IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK = /(\\w+)(\\s+)((https?:\\/\\/|\\/)(\\S+))(\\s+)\u0026quot;(.*?)\u0026quot;(\\s+)-\u0026gt;((https?:\\/\\/|\\/)(\\S+))(\\s*)/i IMAGE_URL_WITH_CAPTION = /((https?:\\/\\/|\\/)(\\S+))(\\s+)\u0026quot;(.*?)\u0026quot;/i IMAGE_URL_WITH_CLASS = /(\\w+)(\\s+)((https?:\\/\\/|\\/)(\\S+))/i IMAGE_URL = /((https?:\\/\\/|\\/)(\\S+))/i def initialize(tag_name, markup, tokens) super if markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK @class = $1 @url = $3 @caption = $7 @link = $9 elsif markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION @class = $1 @url = $3 @caption = $7 elsif markup =~ IMAGE_URL_WITH_CAPTION @url = $1 @caption = $5 elsif markup =~ IMAGE_URL_WITH_CLASS @class = $1 @url = $3 elsif markup =~ IMAGE_URL @url = $1 end end def render(context) if @class source = \u0026quot;\u0026lt;figure class='#{@class}'\u0026gt;\u0026quot; else source = \u0026quot;\u0026lt;figure\u0026gt;\u0026quot; end if @link source += \u0026quot;\u0026lt;a href=\\\u0026quot;#{@link}\\\u0026quot;\u0026gt;\u0026quot; end source += \u0026quot;\u0026lt;img src=\\\u0026quot;#{@url}\\\u0026quot;\u0026gt;\u0026quot; if @link source += \u0026quot;\u0026lt;/a\u0026gt;\u0026quot; end source += \u0026quot;\u0026lt;figcaption\u0026gt;#{@caption}\u0026lt;/figcaption\u0026gt;\u0026quot; if @caption source += \u0026quot;\u0026lt;/figure\u0026gt;\u0026quot; source end end end Liquid::Template.register_tag('image', Jekyll::ImageTag) is written as this Hugo shortcode:\n\u0026lt;!-- image --\u0026gt; \u0026lt;figure {{ with .Get \u0026quot;class\u0026quot; }}class=\u0026quot;{{.}}\u0026quot;{{ end }}\u0026gt; {{ with .Get \u0026quot;link\u0026quot;}}\u0026lt;a href=\u0026quot;{{.}}\u0026quot;\u0026gt;{{ end }} \u0026lt;img src=\u0026quot;{{ .Get \u0026quot;src\u0026quot; }}\u0026quot; {{ if or (.Get \u0026quot;alt\u0026quot;) (.Get \u0026quot;caption\u0026quot;) }}alt=\u0026quot;{{ with .Get \u0026quot;alt\u0026quot;}}{{.}}{{else}}{{ .Get \u0026quot;caption\u0026quot; }}{{ end }}\u0026quot;{{ end }} /\u0026gt; {{ if .Get \u0026quot;link\u0026quot;}}\u0026lt;/a\u0026gt;{{ end }} {{ if or (or (.Get \u0026quot;title\u0026quot;) (.Get \u0026quot;caption\u0026quot;)) (.Get \u0026quot;attr\u0026quot;)}} \u0026lt;figcaption\u0026gt;{{ if isset .Params \u0026quot;title\u0026quot; }} {{ .Get \u0026quot;title\u0026quot; }}{{ end }} {{ if or (.Get \u0026quot;caption\u0026quot;) (.Get \u0026quot;attr\u0026quot;)}}\u0026lt;p\u0026gt; {{ .Get \u0026quot;caption\u0026quot; }} {{ with .Get \u0026quot;attrlink\u0026quot;}}\u0026lt;a href=\u0026quot;{{.}}\u0026quot;\u0026gt; {{ end }} {{ .Get \u0026quot;attr\u0026quot; }} {{ if .Get \u0026quot;attrlink\u0026quot;}}\u0026lt;/a\u0026gt; {{ end }} \u0026lt;/p\u0026gt; {{ end }} \u0026lt;/figcaption\u0026gt; {{ end }} \u0026lt;/figure\u0026gt; \u0026lt;!-- image --\u0026gt; Usage # I simply changed:\n{% image full http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg \u0026quot;One of my favorite touristy-type photos. I secretly waited for the good light while we were \u0026quot;having fun\u0026quot; and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing.\u0026quot; -\u0026gt;http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/ %} to this (this example uses a slightly extended version named fig, different than the built-in figure):\n{{% fig class=\u0026quot;full\u0026quot; src=\u0026quot;http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg\u0026quot; title=\u0026quot;One of my favorite touristy-type photos. I secretly waited for the good light while we were having fun and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing.\u0026quot; link=\u0026quot;http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/\u0026quot; %}} As a bonus, the shortcode named parameters are, arguably, more readable.\nFinishing touches # Fix content # Depending on the amount of customization that was done with each post with Jekyll, this step will require more or less effort. There are no hard and fast rules here except that hugo server --watch is your friend. Test your changes and fix errors as needed.\nClean up # You\u0026rsquo;ll want to remove the Jekyll configuration at this point. If you have anything else that isn\u0026rsquo;t used, delete it.\nA practical example in a diff # Hey, it\u0026rsquo;s Alex was migrated in less than a father-with-kids day from Jekyll to Hugo. You can see all the changes (and screw-ups) by looking at this diff.\n","date":"2015年10月10日","externalUrl":null,"permalink":"/blog/2015/10/10/migrate-from-jekyll/","section":"Blogs","summary":"Move static content to static # Jekyll has a rule that any directory not starting with _ will be copied as-is to the _site output. Hugo keeps all static content under static. You should therefore move it all there. With Jekyll, something that looked like\n","title":"Migrate from Jekyll","type":"blog"},{"content":"","date":"2015年10月10日","externalUrl":null,"permalink":"/tags/","section":"Tags","summary":"","title":"Tags","type":"tags"},{"content":"","date":"2015年10月2日","externalUrl":null,"permalink":"/tags/golang/","section":"Tags","summary":"","title":"Golang","type":"tags"},{"content":"","date":"2015年10月2日","externalUrl":null,"permalink":"/tags/hugo/","section":"Tags","summary":"","title":"Hugo","type":"tags"},{"content":"I\u0026rsquo;m a linked post in the menu. You can add other posts by adding the following line to the frontmatter:\nmenu = \u0026quot;main\u0026quot; Lorem ipsum dolor sit amet, consectetur adipiscing elit. In mauris nulla, vestibulum vel auctor sed, posuere eu lorem. Aliquam consequat augue ut accumsan mollis. Suspendisse malesuada sodales tincidunt. Vivamus sed erat ac augue bibendum porta sed id ipsum. Ut mollis mauris eget ligula sagittis cursus. Aliquam id pharetra tellus. Pellentesque sed tempus risus. Proin id hendrerit ante. Vestibulum vitae urna ut mauris ultricies dignissim. Ut ante turpis, tristique vitae sagittis quis, sagittis nec diam. Fusce pulvinar cursus porta. Vivamus maximus leo dolor, ut pellentesque lorem fringilla nec. Mauris faucibus turpis posuere sapien euismod, a ullamcorper mi maximus.\nMorbi varius ex vel justo dictum placerat. Sed ac arcu pretium, varius elit eget, gravida purus. Fusce sit amet massa mollis eros tincidunt sollicitudin. Suspendisse iaculis cursus mauris ut sagittis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Maecenas elit ligula, molestie quis magna eu, semper posuere lorem. Mauris a justo pharetra, congue ex eget, tincidunt massa. Maecenas sit amet neque lorem.\nCurabitur at elementum quam. Curabitur tristique elit non sapien aliquam vulputate. Vivamus in odio tincidunt, tempor sem quis, tincidunt lacus. Mauris pulvinar nunc sed tempus dictum. Nam vel arcu quis mi fermentum ullamcorper non ac lacus. Donec aliquet vitae ante at imperdiet. Aenean scelerisque venenatis urna, eget elementum risus convallis ac. Nullam gravida arcu lacus, non consectetur augue pretium non. Duis dignissim eros id urna pretium congue. Nullam eu magna in sem sollicitudin tempor. Pellentesque vel convallis ligula. Quisque semper, turpis a rhoncus efficitur, magna nibh iaculis elit, eget tempor dolor eros ut mi. Maecenas eu placerat lacus. Praesent congue pretium nulla, sed suscipit metus rutrum vel.\n","date":"2015年10月2日","externalUrl":null,"permalink":"/blog/2015/10/02/linked-post/","section":"Blogs","summary":"I’m a linked post in the menu. You can add other posts by adding the following line to the frontmatter:\nmenu = \"main\" Lorem ipsum dolor sit amet, consectetur adipiscing elit. In mauris nulla, vestibulum vel auctor sed, posuere eu lorem. Aliquam consequat augue ut accumsan mollis. Suspendisse malesuada sodales tincidunt. Vivamus sed erat ac augue bibendum porta sed id ipsum. Ut mollis mauris eget ligula sagittis cursus. Aliquam id pharetra tellus. Pellentesque sed tempus risus. Proin id hendrerit ante. Vestibulum vitae urna ut mauris ultricies dignissim. Ut ante turpis, tristique vitae sagittis quis, sagittis nec diam. Fusce pulvinar cursus porta. Vivamus maximus leo dolor, ut pellentesque lorem fringilla nec. Mauris faucibus turpis posuere sapien euismod, a ullamcorper mi maximus.\n","title":"Linked post","type":"blog"},{"content":"","date":"2015年10月2日","externalUrl":null,"permalink":"/categories/programming/","section":"Categories","summary":"","title":"Programming","type":"categories"},{"content":"","date":"2015年10月2日","externalUrl":null,"permalink":"/tags/programming/","section":"Tags","summary":"","title":"Programming","type":"tags"},{"content":"","date":"2015年10月2日","externalUrl":null,"permalink":"/tags/theme/","section":"Tags","summary":"","title":"Theme","type":"tags"},{"content":"","date":"2015年9月17日","externalUrl":null,"permalink":"/tags/go/","section":"Tags","summary":"","title":"Go","type":"tags"},{"content":"Hugo uses the excellent go html/template library for its template engine. It is an extremely lightweight engine that provides a very small amount of logic. In our experience that it is just the right amount of logic to be able to create a good static website. If you have used other template systems from different languages or frameworks you will find a lot of similarities in go templates.\nThis document is a brief primer on using go templates. The go docs provide more details.\nIntroduction to Go Templates # Go templates provide an extremely simple template language. It adheres to the belief that only the most basic of logic belongs in the template or view layer. One consequence of this simplicity is that go templates parse very quickly.\nA unique characteristic of go templates is they are content aware. Variables and content will be sanitized depending on the context of where they are used. More details can be found in the go docs.\nBasic Syntax # Go lang templates are html files with the addition of variables and functions.\nGo variables and functions are accessible within {{ }}\nAccessing a predefined variable \u0026ldquo;foo\u0026rdquo;:\n{{ foo }} Parameters are separated using spaces\nCalling the add function with input of 1, 2:\n{{ add 1 2 }} Methods and fields are accessed via dot notation\nAccessing the Page Parameter \u0026ldquo;bar\u0026rdquo;\n{{ .Params.bar }} Parentheses can be used to group items together\n{{ if or (isset .Params \u0026quot;alt\u0026quot;) (isset .Params \u0026quot;caption\u0026quot;) }} Caption {{ end }} Variables # Each go template has a struct (object) made available to it. In hugo each template is passed either a page or a node struct depending on which type of page you are rendering. More details are available on the variables page.\nA variable is accessed by referencing the variable name.\n\u0026lt;title\u0026gt;{{ .Title }}\u0026lt;/title\u0026gt; Variables can also be defined and referenced.\n{{ $address := \u0026quot;123 Main St.\u0026quot;}} {{ $address }} Functions # Go template ship with a few functions which provide basic functionality. The go template system also provides a mechanism for applications to extend the available functions with their own. Hugo template functions provide some additional functionality we believe are useful for building websites. Functions are called by using their name followed by the required parameters separated by spaces. Template functions cannot be added without recompiling hugo.\nExample:\n{{ add 1 2 }} Includes # When including another template you will pass to it the data it will be able to access. To pass along the current context please remember to include a trailing dot. The templates location will always be starting at the /layout/ directory within Hugo.\nExample:\n{{ template \u0026quot;chrome/header.html\u0026quot; . }} Logic # Go templates provide the most basic iteration and conditional logic.\nIteration # Just like in go, the go templates make heavy use of range to iterate over a map, array or slice. The following are different examples of how to use range.\nExample 1: Using Context\n{{ range array }} {{ . }} {{ end }} Example 2: Declaring value variable name\n{{range $element := array}} {{ $element }} {{ end }} Example 2: Declaring key and value variable name\n{{range $index, $element := array}} {{ $index }} {{ $element }} {{ end }} Conditionals # If, else, with, or, \u0026amp; and provide the framework for handling conditional logic in Go Templates. Like range, each statement is closed with end.\nGo Templates treat the following values as false:\nfalse 0 any array, slice, map, or string of length zero Example 1: If\n{{ if isset .Params \u0026quot;title\u0026quot; }}\u0026lt;h4\u0026gt;{{ index .Params \u0026quot;title\u0026quot; }}\u0026lt;/h4\u0026gt;{{ end }} Example 2: If -\u0026gt; Else\n{{ if isset .Params \u0026quot;alt\u0026quot; }} {{ index .Params \u0026quot;alt\u0026quot; }} {{else}} {{ index .Params \u0026quot;caption\u0026quot; }} {{ end }} Example 3: And \u0026amp; Or\n{{ if and (or (isset .Params \u0026quot;title\u0026quot;) (isset .Params \u0026quot;caption\u0026quot;)) (isset .Params \u0026quot;attr\u0026quot;)}} Example 4: With\nAn alternative way of writing \u0026ldquo;if\u0026rdquo; and then referencing the same value is to use \u0026ldquo;with\u0026rdquo; instead. With rebinds the context . within its scope, and skips the block if the variable is absent.\nThe first example above could be simplified as:\n{{ with .Params.title }}\u0026lt;h4\u0026gt;{{ . }}\u0026lt;/h4\u0026gt;{{ end }} Example 5: If -\u0026gt; Else If\n{{ if isset .Params \u0026quot;alt\u0026quot; }} {{ index .Params \u0026quot;alt\u0026quot; }} {{ else if isset .Params \u0026quot;caption\u0026quot; }} {{ index .Params \u0026quot;caption\u0026quot; }} {{ end }} Pipes # One of the most powerful components of go templates is the ability to stack actions one after another. This is done by using pipes. Borrowed from unix pipes, the concept is simple, each pipeline\u0026rsquo;s output becomes the input of the following pipe.\nBecause of the very simple syntax of go templates, the pipe is essential to being able to chain together function calls. One limitation of the pipes is that they only can work with a single value and that value becomes the last parameter of the next pipeline.\nA few simple examples should help convey how to use the pipe.\nExample 1 :\n{{ if eq 1 1 }} Same {{ end }} is the same as\n{{ eq 1 1 | if }} Same {{ end }} It does look odd to place the if at the end, but it does provide a good illustration of how to use the pipes.\nExample 2 :\n{{ index .Params \u0026quot;disqus_url\u0026quot; | html }} Access the page parameter called \u0026ldquo;disqus_url\u0026rdquo; and escape the HTML.\nExample 3 :\n{{ if or (or (isset .Params \u0026quot;title\u0026quot;) (isset .Params \u0026quot;caption\u0026quot;)) (isset .Params \u0026quot;attr\u0026quot;)}} Stuff Here {{ end }} Could be rewritten as\n{{ isset .Params \u0026quot;caption\u0026quot; | or isset .Params \u0026quot;title\u0026quot; | or isset .Params \u0026quot;attr\u0026quot; | if }} Stuff Here {{ end }} Context (aka. the dot) # The most easily overlooked concept to understand about go templates is that {{ . }} always refers to the current context. In the top level of your template this will be the data set made available to it. Inside of a iteration it will have the value of the current item. When inside of a loop the context has changed. . will no longer refer to the data available to the entire page. If you need to access this from within the loop you will likely want to set it to a variable instead of depending on the context.\nExample:\n{{ $title := .Site.Title }} {{ range .Params.tags }} \u0026lt;li\u0026gt; \u0026lt;a href=\u0026quot;{{ $baseurl }}/tags/{{ . | urlize | lower }}\u0026quot;\u0026gt;{{ . }}\u0026lt;/a\u0026gt; - {{ $title }} \u0026lt;/li\u0026gt; {{ end }} Notice how once we have entered the loop the value of {{ . }} has changed. We have defined a variable outside of the loop so we have access to it from within the loop.\nHugo Parameters # Hugo provides the option of passing values to the template language through the site configuration (for sitewide values), or through the meta data of each specific piece of content. You can define any values of any type (supported by your front matter/config format) and use them however you want to inside of your templates.\nUsing Content (page) Parameters # In each piece of content you can provide variables to be used by the templates. This happens in the front matter.\nAn example of this is used in this documentation site. Most of the pages benefit from having the table of contents provided. Sometimes the TOC just doesn\u0026rsquo;t make a lot of sense. We\u0026rsquo;ve defined a variable in our front matter of some pages to turn off the TOC from being displayed.\nHere is the example front matter:\n--- title: \u0026#34;Permalinks\u0026#34; date: \u0026#34;2013-11-18\u0026#34; aliases: - \u0026#34;/doc/permalinks/\u0026#34; groups: [\u0026#34;extras\u0026#34;] groups_weight: 30 notoc: true --- Here is the corresponding code inside of the template:\n{{ if not .Params.notoc }} \u0026lt;div id=\u0026quot;toc\u0026quot; class=\u0026quot;well col-md-4 col-sm-6\u0026quot;\u0026gt; {{ .TableOfContents }} \u0026lt;/div\u0026gt; {{ end }} Using Site (config) Parameters # In your top-level configuration file (eg, config.yaml) you can define site parameters, which are values which will be available to you in chrome.\nFor instance, you might declare:\nparams: CopyrightHTML: \u0026#34;Copyright \u0026amp;#xA9; 2013 John Doe. All Rights Reserved.\u0026#34; TwitterUser: \u0026#34;spf13\u0026#34; SidebarRecentLimit: 5 Within a footer layout, you might then declare a \u0026lt;footer\u0026gt; which is only provided if the CopyrightHTML parameter is provided, and if it is given, you would declare it to be HTML-safe, so that the HTML entity is not escaped again. This would let you easily update just your top-level config file each January 1st, instead of hunting through your templates.\n{{if .Site.Params.CopyrightHTML}}\u0026lt;footer\u0026gt; \u0026lt;div class=\u0026#34;text-center\u0026#34;\u0026gt;{{.Site.Params.CopyrightHTML | safeHtml}}\u0026lt;/div\u0026gt; \u0026lt;/footer\u0026gt;{{end}} An alternative way of writing the \u0026ldquo;if\u0026rdquo; and then referencing the same value is to use \u0026ldquo;with\u0026rdquo; instead. With rebinds the context . within its scope, and skips the block if the variable is absent:\n{{with .Site.Params.TwitterUser}}\u0026lt;span class=\u0026#34;twitter\u0026#34;\u0026gt; \u0026lt;a href=\u0026#34;https://twitter.com/{{.}}\u0026#34; rel=\u0026#34;author\u0026#34;\u0026gt; \u0026lt;img src=\u0026#34;/images/twitter.png\u0026#34; width=\u0026#34;48\u0026#34; height=\u0026#34;48\u0026#34; title=\u0026#34;Twitter: {{.}}\u0026#34; alt=\u0026#34;Twitter\u0026#34;\u0026gt;\u0026lt;/a\u0026gt; \u0026lt;/span\u0026gt;{{end}} Finally, if you want to pull \u0026ldquo;magic constants\u0026rdquo; out of your layouts, you can do so, such as in this example:\n\u0026lt;nav class=\u0026#34;recent\u0026#34;\u0026gt; \u0026lt;h1\u0026gt;Recent Posts\u0026lt;/h1\u0026gt; \u0026lt;ul\u0026gt;{{range first .Site.Params.SidebarRecentLimit .Site.Recent}} \u0026lt;li\u0026gt;\u0026lt;a href=\u0026#34;{{.RelPermalink}}\u0026#34;\u0026gt;{{.Title}}\u0026lt;/a\u0026gt;\u0026lt;/li\u0026gt; {{end}}\u0026lt;/ul\u0026gt; \u0026lt;/nav\u0026gt; ","date":"2015年9月17日","externalUrl":null,"permalink":"/blog/2015/09/17/go-is-for-lovers/","section":"Blogs","summary":"Hugo uses the excellent go html/template library for its template engine. It is an extremely lightweight engine that provides a very small amount of logic. In our experience that it is just the right amount of logic to be able to create a good static website. If you have used other template systems from different languages or frameworks you will find a lot of similarities in go templates.\n","title":"Go is for lovers","type":"blog"},{"content":" Step 1. Install Hugo # Goto hugo releases and download the appropriate version for your os and architecture.\nSave it somewhere specific as we will be using it in the next step.\nMore complete instructions are available at installing hugo\nStep 2. Build the Docs # Hugo has its own example site which happens to also be the documentation site you are reading right now.\nFollow the following steps:\nClone the hugo repository Go into the repo Run hugo in server mode and build the docs Open your browser to http://localhost:1313 Corresponding pseudo commands:\ngit clone https://github.com/spf13/hugo cd hugo /path/to/where/you/installed/hugo server --source=./docs \u0026gt; 29 pages created \u0026gt; 0 tags index created \u0026gt; in 27 ms \u0026gt; Web Server is available at http://localhost:1313 \u0026gt; Press ctrl+c to stop Once you\u0026rsquo;ve gotten here, follow along the rest of this page on your local build.\nStep 3. Change the docs site # Stop the Hugo process by hitting ctrl+c.\nNow we are going to run hugo again, but this time with hugo in watch mode.\n/path/to/hugo/from/step/1/hugo server --source=./docs --watch \u0026gt; 29 pages created \u0026gt; 0 tags index created \u0026gt; in 27 ms \u0026gt; Web Server is available at http://localhost:1313 \u0026gt; Watching for changes in /Users/spf13/Code/hugo/docs/content \u0026gt; Press ctrl+c to stop Open your favorite editor and change one of the source content pages. How about changing this very file to fix the typo. How about changing this very file to fix the typo.\nContent files are found in docs/content/. Unless otherwise specified, files are located at the same relative location as the url, in our case docs/content/overview/quickstart.md.\nChange and save this file.. Notice what happened in your terminal.\n\u0026gt; Change detected, rebuilding site \u0026gt; 29 pages created \u0026gt; 0 tags index created \u0026gt; in 26 ms Refresh the browser and observe that the typo is now fixed.\nNotice how quick that was. Try to refresh the site before it\u0026rsquo;s finished building.. I double dare you. Having nearly instant feedback enables you to have your creativity flow without waiting for long builds.\nStep 4. Have fun # The best way to learn something is to play with it.\n","date":"2015年8月3日","externalUrl":null,"permalink":"/blog/2015/08/03/hugo-is-for-lovers/","section":"Blogs","summary":"Step 1. Install Hugo # Goto hugo releases and download the appropriate version for your os and architecture.\nSave it somewhere specific as we will be using it in the next step.\n","title":"Hugo is for lovers","type":"blog"},{"content":"","date":"2015年8月3日","externalUrl":null,"permalink":"/categories/pseudo/","section":"Categories","summary":"","title":"Pseudo","type":"categories"},{"content":" Introduction # This tutorial will show you how to create a simple theme in Hugo. I assume that you are familiar with HTML, the bash command line, and that you are comfortable using Markdown to format content. I\u0026rsquo;ll explain how Hugo uses templates and how you can organize your templates to create a theme. I won\u0026rsquo;t cover using CSS to style your theme.\nWe\u0026rsquo;ll start with creating a new site with a very basic template. Then we\u0026rsquo;ll add in a few pages and posts. With small variations on that, you will be able to create many different types of web sites.\nIn this tutorial, commands that you enter will start with the \u0026ldquo;$\u0026rdquo; prompt. The output will follow. Lines that start with \u0026ldquo;#\u0026rdquo; are comments that I\u0026rsquo;ve added to explain a point. When I show updates to a file, the \u0026ldquo;:wq\u0026rdquo; on the last line means to save the file.\nHere\u0026rsquo;s an example:\n## this is a comment $ echo this is a command this is a command ## edit the file $vi foo.md +++ date = \u0026#34;2014-09-28\u0026#34; title = \u0026#34;creating a new theme\u0026#34; +++ bah and humbug :wq ## show it $ cat foo.md +++ date = \u0026#34;2014-09-28\u0026#34; title = \u0026#34;creating a new theme\u0026#34; +++ bah and humbug $ Some Definitions # There are a few concepts that you need to understand before creating a theme.\nSkins # Skins are the files responsible for the look and feel of your site. It’s the CSS that controls colors and fonts, it’s the Javascript that determines actions and reactions. It’s also the rules that Hugo uses to transform your content into the HTML that the site will serve to visitors.\nYou have two ways to create a skin. The simplest way is to create it in the layouts/ directory. If you do, then you don’t have to worry about configuring Hugo to recognize it. The first place that Hugo will look for rules and files is in the layouts/ directory so it will always find the skin.\nYour second choice is to create it in a sub-directory of the themes/ directory. If you do, then you must always tell Hugo where to search for the skin. It’s extra work, though, so why bother with it?\nThe difference between creating a skin in layouts/ and creating it in themes/ is very subtle. A skin in layouts/ can’t be customized without updating the templates and static files that it is built from. A skin created in themes/, on the other hand, can be and that makes it easier for other people to use it.\nThe rest of this tutorial will call a skin created in the themes/ directory a theme.\nNote that you can use this tutorial to create a skin in the layouts/ directory if you wish to. The main difference will be that you won’t need to update the site’s configuration file to use a theme.\nThe Home Page # The home page, or landing page, is the first page that many visitors to a site see. It is the index.html file in the root directory of the web site. Since Hugo writes files to the public/ directory, our home page is public/index.html.\nSite Configuration File # When Hugo runs, it looks for a configuration file that contains settings that override default values for the entire site. The file can use TOML, YAML, or JSON. I prefer to use TOML for my configuration files. If you prefer to use JSON or YAML, you’ll need to translate my examples. You’ll also need to change the name of the file since Hugo uses the extension to determine how to process it.\nHugo translates Markdown files into HTML. By default, Hugo expects to find Markdown files in your content/ directory and template files in your themes/ directory. It will create HTML files in your public/ directory. You can change this by specifying alternate locations in the configuration file.\nContent # Content is stored in text files that contain two sections. The first section is the “front matter,” which is the meta-information on the content. The second section contains Markdown that will be converted to HTML.\nFront Matter # The front matter is information about the content. Like the configuration file, it can be written in TOML, YAML, or JSON. Unlike the configuration file, Hugo doesn’t use the file’s extension to know the format. It looks for markers to signal the type. TOML is surrounded by “+++”, YAML by “---”, and JSON is enclosed in curly braces. I prefer to use TOML, so you’ll need to translate my examples if you prefer YAML or JSON.\nThe information in the front matter is passed into the template before the content is rendered into HTML.\nMarkdown # Content is written in Markdown which makes it easier to create the content. Hugo runs the content through a Markdown engine to create the HTML which will be written to the output file.\nTemplate Files # Hugo uses template files to render content into HTML. Template files are a bridge between the content and presentation. Rules in the template define what content is published, where it\u0026rsquo;s published to, and how it will rendered to the HTML file. The template guides the presentation by specifying the style to use.\nThere are three types of templates: single, list, and partial. Each type takes a bit of content as input and transforms it based on the commands in the template.\nHugo uses its knowledge of the content to find the template file used to render the content. If it can’t find a template that is an exact match for the content, it will shift up a level and search from there. It will continue to do so until it finds a matching template or runs out of templates to try. If it can’t find a template, it will use the default template for the site.\nPlease note that you can use the front matter to influence Hugo’s choice of templates.\nSingle Template # A single template is used to render a single piece of content. For example, an article or post would be a single piece of content and use a single template.\nList Template # A list template renders a group of related content. That could be a summary of recent postings or all articles in a category. List templates can contain multiple groups.\nThe homepage template is a special type of list template. Hugo assumes that the home page of your site will act as the portal for the rest of the content in the site.\nPartial Template # A partial template is a template that can be included in other templates. Partial templates must be called using the “partial” template command. They are very handy for rolling up common behavior. For example, your site may have a banner that all pages use. Instead of copying the text of the banner into every single and list template, you could create a partial with the banner in it. That way if you decide to change the banner, you only have to change the partial template.\nCreate a New Site # Let\u0026rsquo;s use Hugo to create a new web site. I\u0026rsquo;m a Mac user, so I\u0026rsquo;ll create mine in my home directory, in the Sites folder. If you\u0026rsquo;re using Linux, you might have to create the folder first.\nThe \u0026ldquo;new site\u0026rdquo; command will create a skeleton of a site. It will give you the basic directory structure and a useable configuration file.\n$ hugo new site ~/Sites/zafta $ cd ~/Sites/zafta $ ls -l total 8 drwxr-xr-x 7 quoha staff 238 Sep 29 16:49 . drwxr-xr-x 3 quoha staff 102 Sep 29 16:49 .. drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes -rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static $ Take a look in the content/ directory to confirm that it is empty.\nThe other directories (archetypes/, layouts/, and static/) are used when customizing a theme. That\u0026rsquo;s a topic for a different tutorial, so please ignore them for now.\nGenerate the HTML For the New Site # Running the hugo command with no options will read all the available content and generate the HTML files. It will also copy all static files (that\u0026rsquo;s everything that\u0026rsquo;s not content). Since we have an empty site, it won\u0026rsquo;t do much, but it will do it very quickly.\n$ hugo --verbose INFO: 2014/09/29 Using config file: config.toml INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html] WARN: 2014/09/29 Unable to locate layout: [404.html] 0 draft content 0 future content 0 pages created 0 tags created 0 categories created in 2 ms $ The \u0026ldquo;--verbose\u0026rdquo; flag gives extra information that will be helpful when we build the template. Every line of the output that starts with \u0026ldquo;INFO:\u0026rdquo; or \u0026ldquo;WARN:\u0026rdquo; is present because we used that flag. The lines that start with \u0026ldquo;WARN:\u0026rdquo; are warning messages. We\u0026rsquo;ll go over them later.\nWe can verify that the command worked by looking at the directory again.\n$ ls -l total 8 drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes -rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts drwxr-xr-x 4 quoha staff 136 Sep 29 17:02 public drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static $ See that new public/ directory? Hugo placed all generated content there. When you\u0026rsquo;re ready to publish your web site, that\u0026rsquo;s the place to start. For now, though, let\u0026rsquo;s just confirm that we have what we\u0026rsquo;d expect from a site with no content.\n$ ls -l public total 16 -rw-r--r-- 1 quoha staff 416 Sep 29 17:02 index.xml -rw-r--r-- 1 quoha staff 262 Sep 29 17:02 sitemap.xml $ Hugo created two XML files, which is standard, but there are no HTML files.\nTest the New Site # Verify that you can run the built-in web server. It will dramatically shorten your development cycle if you do. Start it by running the \u0026ldquo;server\u0026rdquo; command. If it is successful, you will see output similar to the following:\n$ hugo server --verbose INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html] WARN: 2014/09/29 Unable to locate layout: [404.html] 0 draft content 0 future content 0 pages created 0 tags created 0 categories created in 2 ms Serving pages from /Users/quoha/Sites/zafta/public Web Server is available at http://localhost:1313 Press Ctrl+C to stop Connect to the listed URL (it\u0026rsquo;s on the line that starts with \u0026ldquo;Web Server\u0026rdquo;). If everything is working correctly, you should get a page that shows the following:\nindex.xml sitemap.xml That\u0026rsquo;s a listing of your public/ directory. Hugo didn\u0026rsquo;t create a home page because our site has no content. When there\u0026rsquo;s no index.html file in a directory, the server lists the files in the directory, which is what you should see in your browser.\nLet’s go back and look at those warnings again.\nWARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html] WARN: 2014/09/29 Unable to locate layout: [404.html] That second warning is easier to explain. We haven’t created a template to be used to generate “page not found errors.” The 404 message is a topic for a separate tutorial.\nNow for the first warning. It is for the home page. You can tell because the first layout that it looked for was “index.html.” That’s only used by the home page.\nI like that the verbose flag causes Hugo to list the files that it\u0026rsquo;s searching for. For the home page, they are index.html, _default/list.html, and _default/single.html. There are some rules that we\u0026rsquo;ll cover later that explain the names and paths. For now, just remember that Hugo couldn\u0026rsquo;t find a template for the home page and it told you so.\nAt this point, you\u0026rsquo;ve got a working installation and site that we can build upon. All that’s left is to add some content and a theme to display it.\nCreate a New Theme # Hugo doesn\u0026rsquo;t ship with a default theme. There are a few available (I counted a dozen when I first installed Hugo) and Hugo comes with a command to create new themes.\nWe\u0026rsquo;re going to create a new theme called \u0026ldquo;zafta.\u0026rdquo; Since the goal of this tutorial is to show you how to fill out the files to pull in your content, the theme will not contain any CSS. In other words, ugly but functional.\nAll themes have opinions on content and layout. For example, Zafta uses \u0026ldquo;post\u0026rdquo; over \u0026ldquo;blog\u0026rdquo;. Strong opinions make for simpler templates but differing opinions make it tougher to use themes. When you build a theme, consider using the terms that other themes do.\nCreate a Skeleton # Use the hugo \u0026ldquo;new\u0026rdquo; command to create the skeleton of a theme. This creates the directory structure and places empty files for you to fill out.\n$ hugo new theme zafta $ ls -l total 8 drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes -rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts drwxr-xr-x 4 quoha staff 136 Sep 29 17:02 public drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static drwxr-xr-x 3 quoha staff 102 Sep 29 17:31 themes $ find themes -type f | xargs ls -l -rw-r--r-- 1 quoha staff 1081 Sep 29 17:31 themes/zafta/LICENSE.md -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/archetypes/default.md -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/single.html -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/index.html -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/footer.html -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/header.html -rw-r--r-- 1 quoha staff 93 Sep 29 17:31 themes/zafta/theme.toml $ The skeleton includes templates (the files ending in .html), license file, a description of your theme (the theme.toml file), and an empty archetype.\nPlease take a minute to fill out the theme.toml and LICENSE.md files. They\u0026rsquo;re optional, but if you\u0026rsquo;re going to be distributing your theme, it tells the world who to praise (or blame). It\u0026rsquo;s also nice to declare the license so that people will know how they can use the theme.\n$ vi themes/zafta/theme.toml author = \u0026#34;michael d henderson\u0026#34; description = \u0026#34;a minimal working template\u0026#34; license = \u0026#34;MIT\u0026#34; name = \u0026#34;zafta\u0026#34; source_repo = \u0026#34;\u0026#34; tags = [\u0026#34;tags\u0026#34;, \u0026#34;categories\u0026#34;] :wq ## also edit themes/zafta/LICENSE.md and change ## the bit that says \u0026#34;YOUR_NAME_HERE\u0026#34; Note that the the skeleton\u0026rsquo;s template files are empty. Don\u0026rsquo;t worry, we\u0026rsquo;ll be changing that shortly.\n$ find themes/zafta -name \u0026#39;*.html\u0026#39; | xargs ls -l -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/single.html -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/index.html -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/footer.html -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/header.html $ Update the Configuration File to Use the Theme # Now that we\u0026rsquo;ve got a theme to work with, it\u0026rsquo;s a good idea to add the theme name to the configuration file. This is optional, because you can always add \u0026ldquo;-t zafta\u0026rdquo; on all your commands. I like to put it the configuration file because I like shorter command lines. If you don\u0026rsquo;t put it in the configuration file or specify it on the command line, you won\u0026rsquo;t use the template that you\u0026rsquo;re expecting to.\nEdit the file to add the theme, add a title for the site, and specify that all of our content will use the TOML format.\n$ vi config.toml theme = \u0026#34;zafta\u0026#34; baseurl = \u0026#34;\u0026#34; languageCode = \u0026#34;en-us\u0026#34; title = \u0026#34;zafta - totally refreshing\u0026#34; MetaDataFormat = \u0026#34;toml\u0026#34; :wq $ Generate the Site # Now that we have an empty theme, let\u0026rsquo;s generate the site again.\n$ hugo --verbose INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] 0 draft content 0 future content 0 pages created 0 tags created 0 categories created in 2 ms $ Did you notice that the output is different? The warning message for the home page has disappeared and we have an additional information line saying that Hugo is syncing from the theme\u0026rsquo;s directory.\nLet\u0026rsquo;s check the public/ directory to see what Hugo\u0026rsquo;s created.\n$ ls -l public total 16 drwxr-xr-x 2 quoha staff 68 Sep 29 17:56 css -rw-r--r-- 1 quoha staff 0 Sep 29 17:56 index.html -rw-r--r-- 1 quoha staff 407 Sep 29 17:56 index.xml drwxr-xr-x 2 quoha staff 68 Sep 29 17:56 js -rw-r--r-- 1 quoha staff 243 Sep 29 17:56 sitemap.xml $ Notice four things:\nHugo created a home page. This is the file public/index.html. Hugo created a css/ directory. Hugo created a js/ directory. Hugo claimed that it created 0 pages. It created a file and copied over static files, but didn\u0026rsquo;t create any pages. That\u0026rsquo;s because it considers a \u0026ldquo;page\u0026rdquo; to be a file created directly from a content file. It doesn\u0026rsquo;t count things like the index.html files that it creates automatically. The Home Page # Hugo supports many different types of templates. The home page is special because it gets its own type of template and its own template file. The file, layouts/index.html, is used to generate the HTML for the home page. The Hugo documentation says that this is the only required template, but that depends. Hugo\u0026rsquo;s warning message shows that it looks for three different templates:\nWARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html] If it can\u0026rsquo;t find any of these, it completely skips creating the home page. We noticed that when we built the site without having a theme installed.\nWhen Hugo created our theme, it created an empty home page template. Now, when we build the site, Hugo finds the template and uses it to generate the HTML for the home page. Since the template file is empty, the HTML file is empty, too. If the template had any rules in it, then Hugo would have used them to generate the home page.\n$ find . -name index.html | xargs ls -l -rw-r--r-- 1 quoha staff 0 Sep 29 20:21 ./public/index.html -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 ./themes/zafta/layouts/index.html $ The Magic of Static # Hugo does two things when generating the site. It uses templates to transform content into HTML and it copies static files into the site. Unlike content, static files are not transformed. They are copied exactly as they are.\nHugo assumes that your site will use both CSS and JavaScript, so it creates directories in your theme to hold them. Remember opinions? Well, Hugo\u0026rsquo;s opinion is that you\u0026rsquo;ll store your CSS in a directory named css/ and your JavaScript in a directory named js/. If you don\u0026rsquo;t like that, you can change the directory names in your theme directory or even delete them completely. Hugo\u0026rsquo;s nice enough to offer its opinion, then behave nicely if you disagree.\n$ find themes/zafta -type d | xargs ls -ld drwxr-xr-x 7 quoha staff 238 Sep 29 17:38 themes/zafta drwxr-xr-x 3 quoha staff 102 Sep 29 17:31 themes/zafta/archetypes drwxr-xr-x 5 quoha staff 170 Sep 29 17:31 themes/zafta/layouts drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/layouts/_default drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/layouts/partials drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/static drwxr-xr-x 2 quoha staff 68 Sep 29 17:31 themes/zafta/static/css drwxr-xr-x 2 quoha staff 68 Sep 29 17:31 themes/zafta/static/js $ The Theme Development Cycle # When you\u0026rsquo;re working on a theme, you will make changes in the theme\u0026rsquo;s directory, rebuild the site, and check your changes in the browser. Hugo makes this very easy:\nPurge the public/ directory. Run the built in web server in watch mode. Open your site in a browser. Update the theme. Glance at your browser window to see changes. Return to step 4. I’ll throw in one more opinion: never work on a theme on a live site. Always work on a copy of your site. Make changes to your theme, test them, then copy them up to your site. For added safety, use a tool like Git to keep a revision history of your content and your theme. Believe me when I say that it is too easy to lose both your mind and your changes.\nCheck the main Hugo site for information on using Git with Hugo.\nPurge the public/ Directory # When generating the site, Hugo will create new files and update existing ones in the public/ directory. It will not delete files that are no longer used. For example, files that were created in the wrong directory or with the wrong title will remain. If you leave them, you might get confused by them later. I recommend cleaning out your site prior to generating it.\nNote: If you\u0026rsquo;re building on an SSD, you should ignore this. Churning on a SSD can be costly.\nHugo\u0026rsquo;s Watch Option # Hugo\u0026rsquo;s \u0026ldquo;--watch\u0026rdquo; option will monitor the content/ and your theme directories for changes and rebuild the site automatically.\nLive Reload # Hugo\u0026rsquo;s built in web server supports live reload. As pages are saved on the server, the browser is told to refresh the page. Usually, this happens faster than you can say, \u0026ldquo;Wow, that\u0026rsquo;s totally amazing.\u0026rdquo;\nDevelopment Commands # Use the following commands as the basis for your workflow.\n## purge old files. hugo will recreate the public directory. ## $ rm -rf public ## ## run hugo in watch mode ## $ hugo server --watch --verbose Here\u0026rsquo;s sample output showing Hugo detecting a change to the template for the home page. Once generated, the web browser automatically reloaded the page. I\u0026rsquo;ve said this before, it\u0026rsquo;s amazing.\n$ rm -rf public $ hugo server --watch --verbose INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] 0 draft content 0 future content 0 pages created 0 tags created 0 categories created in 2 ms Watching for changes in /Users/quoha/Sites/zafta/content Serving pages from /Users/quoha/Sites/zafta/public Web Server is available at http://localhost:1313 Press Ctrl+C to stop INFO: 2014/09/29 File System Event: [\u0026#34;/Users/quoha/Sites/zafta/themes/zafta/layouts/index.html\u0026#34;: MODIFY|ATTRIB] Change detected, rebuilding site WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] 0 draft content 0 future content 0 pages created 0 tags created 0 categories created in 1 ms Update the Home Page Template # The home page is one of a few special pages that Hugo creates automatically. As mentioned earlier, it looks for one of three files in the theme\u0026rsquo;s layout/ directory:\nindex.html _default/list.html _default/single.html We could update one of the default templates, but a good design decision is to update the most specific template available. That\u0026rsquo;s not a hard and fast rule (in fact, we\u0026rsquo;ll break it a few times in this tutorial), but it is a good generalization.\nMake a Static Home Page # Right now, that page is empty because we don\u0026rsquo;t have any content and we don\u0026rsquo;t have any logic in the template. Let\u0026rsquo;s change that by adding some text to the template.\n$ vi themes/zafta/layouts/index.html \u0026lt;!DOCTYPE html\u0026gt; \u0026lt;html\u0026gt; \u0026lt;body\u0026gt; \u0026lt;p\u0026gt;hugo says hello!\u0026lt;/p\u0026gt; \u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; :wq $ Build the web site and then verify the results.\n$ hugo --verbose INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] 0 draft content 0 future content 0 pages created 0 tags created 0 categories created in 2 ms $ find public -type f -name \u0026#39;*.html\u0026#39; | xargs ls -l -rw-r--r-- 1 quoha staff 78 Sep 29 21:26 public/index.html $ cat public/index.html \u0026lt;!DOCTYPE html\u0026gt; \u0026lt;html\u0026gt; \u0026lt;body\u0026gt; \u0026lt;p\u0026gt;hugo says hello!\u0026lt;/p\u0026gt; \u0026lt;/html\u0026gt; Live Reload # Note: If you\u0026rsquo;re running the server with the --watch option, you\u0026rsquo;ll see different content in the file:\n$ cat public/index.html \u0026lt;!DOCTYPE html\u0026gt; \u0026lt;html\u0026gt; \u0026lt;body\u0026gt; \u0026lt;p\u0026gt;hugo says hello!\u0026lt;/p\u0026gt; \u0026lt;script\u0026gt;document.write(\u0026#39;\u0026lt;script src=\u0026#34;http://\u0026#39; + (location.host || \u0026#39;localhost\u0026#39;).split(\u0026#39;:\u0026#39;)[0] + \u0026#39;:1313/livereload.js?mindelay=10\u0026#34;\u0026gt;\u0026lt;/\u0026#39; + \u0026#39;script\u0026gt;\u0026#39;)\u0026lt;/script\u0026gt;\u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; When you use --watch, the Live Reload script is added by Hugo. Look for live reload in the documentation to see what it does and how to disable it.\nBuild a \u0026ldquo;Dynamic\u0026rdquo; Home Page # \u0026ldquo;Dynamic home page?\u0026rdquo; Hugo\u0026rsquo;s a static web site generator, so this seems an odd thing to say. I mean let\u0026rsquo;s have the home page automatically reflect the content in the site every time Hugo builds it. We\u0026rsquo;ll use iteration in the template to do that.\nCreate New Posts # Now that we have the home page generating static content, let\u0026rsquo;s add some content to the site. We\u0026rsquo;ll display these posts as a list on the home page and on their own page, too.\nHugo has a command to generate a skeleton post, just like it does for sites and themes.\n$ hugo --verbose new post/first.md INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml INFO: 2014/09/29 attempting to create post/first.md of post INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/default.md ERROR: 2014/09/29 Unable to Cast \u0026lt;nil\u0026gt; to map[string]interface{} $ That wasn\u0026rsquo;t very nice, was it?\nThe \u0026ldquo;new\u0026rdquo; command uses an archetype to create the post file. Hugo created an empty default archetype file, but that causes an error when there\u0026rsquo;s a theme. For me, the workaround was to create an archetypes file specifically for the post type.\n$ vi themes/zafta/archetypes/post.md +++ Description = \u0026#34;\u0026#34; Tags = [] Categories = [] +++ :wq $ find themes/zafta/archetypes -type f | xargs ls -l -rw-r--r-- 1 quoha staff 0 Sep 29 21:53 themes/zafta/archetypes/default.md -rw-r--r-- 1 quoha staff 51 Sep 29 21:54 themes/zafta/archetypes/post.md $ hugo --verbose new post/first.md INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml INFO: 2014/09/29 attempting to create post/first.md of post INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/first.md /Users/quoha/Sites/zafta/content/post/first.md created $ hugo --verbose new post/second.md INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml INFO: 2014/09/29 attempting to create post/second.md of post INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/second.md /Users/quoha/Sites/zafta/content/post/second.md created $ ls -l content/post total 16 -rw-r--r-- 1 quoha staff 104 Sep 29 21:54 first.md -rw-r--r-- 1 quoha staff 105 Sep 29 21:57 second.md $ cat content/post/first.md +++ Categories = [] Description = \u0026#34;\u0026#34; Tags = [] date = \u0026#34;2014-09-29T21:54:53-05:00\u0026#34; title = \u0026#34;first\u0026#34; +++ my first post $ cat content/post/second.md +++ Categories = [] Description = \u0026#34;\u0026#34; Tags = [] date = \u0026#34;2014-09-29T21:57:09-05:00\u0026#34; title = \u0026#34;second\u0026#34; +++ my second post $ Build the web site and then verify the results.\n$ rm -rf public $ hugo --verbose INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ INFO: 2014/09/29 found taxonomies: map[string]string{\u0026#34;category\u0026#34;:\u0026#34;categories\u0026#34;, \u0026#34;tag\u0026#34;:\u0026#34;tags\u0026#34;} WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] 0 draft content 0 future content 2 pages created 0 tags created 0 categories created in 4 ms $ The output says that it created 2 pages. Those are our new posts:\n$ find public -type f -name \u0026#39;*.html\u0026#39; | xargs ls -l -rw-r--r-- 1 quoha staff 78 Sep 29 22:13 public/index.html -rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/first/index.html -rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/index.html -rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/second/index.html $ The new files are empty because because the templates used to generate the content are empty. The homepage doesn\u0026rsquo;t show the new content, either. We have to update the templates to add the posts.\nList and Single Templates # In Hugo, we have three major kinds of templates. There\u0026rsquo;s the home page template that we updated previously. It is used only by the home page. We also have \u0026ldquo;single\u0026rdquo; templates which are used to generate output for a single content file. We also have \u0026ldquo;list\u0026rdquo; templates that are used to group multiple pieces of content before generating output.\nGenerally speaking, list templates are named \u0026ldquo;list.html\u0026rdquo; and single templates are named \u0026ldquo;single.html.\u0026rdquo;\nThere are three other types of templates: partials, content views, and terms. We will not go into much detail on these.\nAdd Content to the Homepage # The home page will contain a list of posts. Let\u0026rsquo;s update its template to add the posts that we just created. The logic in the template will run every time we build the site.\n$ vi themes/zafta/layouts/index.html \u0026lt;!DOCTYPE html\u0026gt; \u0026lt;html\u0026gt; \u0026lt;body\u0026gt; {{ range first 10 .Data.Pages }} \u0026lt;h1\u0026gt;{{ .Title }}\u0026lt;/h1\u0026gt; {{ end }} \u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; :wq $ Hugo uses the Go template engine. That engine scans the template files for commands which are enclosed between \u0026ldquo;{{\u0026rdquo; and \u0026ldquo;}}\u0026rdquo;. In our template, the commands are:\nrange .Title end The \u0026ldquo;range\u0026rdquo; command is an iterator. We\u0026rsquo;re going to use it to go through the first ten pages. Every HTML file that Hugo creates is treated as a page, so looping through the list of pages will look at every file that will be created.\nThe \u0026ldquo;.Title\u0026rdquo; command prints the value of the \u0026ldquo;title\u0026rdquo; variable. Hugo pulls it from the front matter in the Markdown file.\nThe \u0026ldquo;end\u0026rdquo; command signals the end of the range iterator. The engine loops back to the top of the iteration when it finds \u0026ldquo;end.\u0026rdquo; Everything between the \u0026ldquo;range\u0026rdquo; and \u0026ldquo;end\u0026rdquo; is evaluated every time the engine goes through the iteration. In this file, that would cause the title from the first ten pages to be output as heading level one.\nIt\u0026rsquo;s helpful to remember that some variables, like .Data, are created before any output files. Hugo loads every content file into the variable and then gives the template a chance to process before creating the HTML files.\nBuild the web site and then verify the results.\n$ rm -rf public $ hugo --verbose INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ INFO: 2014/09/29 found taxonomies: map[string]string{\u0026#34;tag\u0026#34;:\u0026#34;tags\u0026#34;, \u0026#34;category\u0026#34;:\u0026#34;categories\u0026#34;} WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] 0 draft content 0 future content 2 pages created 0 tags created 0 categories created in 4 ms $ find public -type f -name \u0026#39;*.html\u0026#39; | xargs ls -l -rw-r--r-- 1 quoha staff 94 Sep 29 22:23 public/index.html -rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/first/index.html -rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/index.html -rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/second/index.html $ cat public/index.html \u0026lt;!DOCTYPE html\u0026gt; \u0026lt;html\u0026gt; \u0026lt;body\u0026gt; \u0026lt;h1\u0026gt;second\u0026lt;/h1\u0026gt; \u0026lt;h1\u0026gt;first\u0026lt;/h1\u0026gt; \u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; $ Congratulations, the home page shows the title of the two posts. The posts themselves are still empty, but let\u0026rsquo;s take a moment to appreciate what we\u0026rsquo;ve done. Your template now generates output dynamically. Believe it or not, by inserting the range command inside of those curly braces, you\u0026rsquo;ve learned everything you need to know to build a theme. All that\u0026rsquo;s really left is understanding which template will be used to generate each content file and becoming familiar with the commands for the template engine.\nAnd, if that were entirely true, this tutorial would be much shorter. There are a few things to know that will make creating a new template much easier. Don\u0026rsquo;t worry, though, that\u0026rsquo;s all to come.\nAdd Content to the Posts # We\u0026rsquo;re working with posts, which are in the content/post/ directory. That means that their section is \u0026ldquo;post\u0026rdquo; (and if we don\u0026rsquo;t do something weird, their type is also \u0026ldquo;post\u0026rdquo;).\nHugo uses the section and type to find the template file for every piece of content. Hugo will first look for a template file that matches the section or type name. If it can\u0026rsquo;t find one, then it will look in the _default/ directory. There are some twists that we\u0026rsquo;ll cover when we get to categories and tags, but for now we can assume that Hugo will try post/single.html, then _default/single.html.\nNow that we know the search rule, let\u0026rsquo;s see what we actually have available:\n$ find themes/zafta -name single.html | xargs ls -l -rw-r--r-- 1 quoha staff 132 Sep 29 17:31 themes/zafta/layouts/_default/single.html We could create a new template, post/single.html, or change the default. Since we don\u0026rsquo;t know of any other content types, let\u0026rsquo;s start with updating the default.\nRemember, any content that we haven\u0026rsquo;t created a template for will end up using this template. That can be good or bad. Bad because I know that we\u0026rsquo;re going to be adding different types of content and we\u0026rsquo;re going to end up undoing some of the changes we\u0026rsquo;ve made. It\u0026rsquo;s good because we\u0026rsquo;ll be able to see immediate results. It\u0026rsquo;s also good to start here because we can start to build the basic layout for the site. As we add more content types, we\u0026rsquo;ll refactor this file and move logic around. Hugo makes that fairly painless, so we\u0026rsquo;ll accept the cost and proceed.\nPlease see the Hugo documentation on template rendering for all the details on determining which template to use. And, as the docs mention, if you\u0026rsquo;re building a single page application (SPA) web site, you can delete all of the other templates and work with just the default single page. That\u0026rsquo;s a refreshing amount of joy right there.\nUpdate the Template File # $ vi themes/zafta/layouts/_default/single.html \u0026lt;!DOCTYPE html\u0026gt; \u0026lt;html\u0026gt; \u0026lt;head\u0026gt; \u0026lt;title\u0026gt;{{ .Title }}\u0026lt;/title\u0026gt; \u0026lt;/head\u0026gt; \u0026lt;body\u0026gt; \u0026lt;h1\u0026gt;{{ .Title }}\u0026lt;/h1\u0026gt; {{ .Content }} \u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; :wq $ Build the web site and verify the results.\n$ rm -rf public $ hugo --verbose INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ INFO: 2014/09/29 found taxonomies: map[string]string{\u0026#34;tag\u0026#34;:\u0026#34;tags\u0026#34;, \u0026#34;category\u0026#34;:\u0026#34;categories\u0026#34;} WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] 0 draft content 0 future content 2 pages created 0 tags created 0 categories created in 4 ms $ find public -type f -name \u0026#39;*.html\u0026#39; | xargs ls -l -rw-r--r-- 1 quoha staff 94 Sep 29 22:40 public/index.html -rw-r--r-- 1 quoha staff 125 Sep 29 22:40 public/post/first/index.html -rw-r--r-- 1 quoha staff 0 Sep 29 22:40 public/post/index.html -rw-r--r-- 1 quoha staff 128 Sep 29 22:40 public/post/second/index.html $ cat public/post/first/index.html \u0026lt;!DOCTYPE html\u0026gt; \u0026lt;html\u0026gt; \u0026lt;head\u0026gt; \u0026lt;title\u0026gt;first\u0026lt;/title\u0026gt; \u0026lt;/head\u0026gt; \u0026lt;body\u0026gt; \u0026lt;h1\u0026gt;first\u0026lt;/h1\u0026gt; \u0026lt;p\u0026gt;my first post\u0026lt;/p\u0026gt; \u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; $ cat public/post/second/index.html \u0026lt;!DOCTYPE html\u0026gt; \u0026lt;html\u0026gt; \u0026lt;head\u0026gt; \u0026lt;title\u0026gt;second\u0026lt;/title\u0026gt; \u0026lt;/head\u0026gt; \u0026lt;body\u0026gt; \u0026lt;h1\u0026gt;second\u0026lt;/h1\u0026gt; \u0026lt;p\u0026gt;my second post\u0026lt;/p\u0026gt; \u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; $ Notice that the posts now have content. You can go to localhost:1313/post/first to verify.\nLinking to Content # The posts are on the home page. Let\u0026rsquo;s add a link from there to the post. Since this is the home page, we\u0026rsquo;ll update its template.\n$ vi themes/zafta/layouts/index.html \u0026lt;!DOCTYPE html\u0026gt; \u0026lt;html\u0026gt; \u0026lt;body\u0026gt; {{ range first 10 .Data.Pages }} \u0026lt;h1\u0026gt;\u0026lt;a href=\u0026#34;{{ .Permalink }}\u0026#34;\u0026gt;{{ .Title }}\u0026lt;/a\u0026gt;\u0026lt;/h1\u0026gt; {{ end }} \u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; Build the web site and verify the results.\n$ rm -rf public $ hugo --verbose INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ INFO: 2014/09/29 found taxonomies: map[string]string{\u0026#34;tag\u0026#34;:\u0026#34;tags\u0026#34;, \u0026#34;category\u0026#34;:\u0026#34;categories\u0026#34;} WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] 0 draft content 0 future content 2 pages created 0 tags created 0 categories created in 4 ms $ find public -type f -name \u0026#39;*.html\u0026#39; | xargs ls -l -rw-r--r-- 1 quoha staff 149 Sep 29 22:44 public/index.html -rw-r--r-- 1 quoha staff 125 Sep 29 22:44 public/post/first/index.html -rw-r--r-- 1 quoha staff 0 Sep 29 22:44 public/post/index.html -rw-r--r-- 1 quoha staff 128 Sep 29 22:44 public/post/second/index.html $ cat public/index.html \u0026lt;!DOCTYPE html\u0026gt; \u0026lt;html\u0026gt; \u0026lt;body\u0026gt; \u0026lt;h1\u0026gt;\u0026lt;a href=\u0026#34;/post/second/\u0026#34;\u0026gt;second\u0026lt;/a\u0026gt;\u0026lt;/h1\u0026gt; \u0026lt;h1\u0026gt;\u0026lt;a href=\u0026#34;/post/first/\u0026#34;\u0026gt;first\u0026lt;/a\u0026gt;\u0026lt;/h1\u0026gt; \u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; $ Create a Post Listing # We have the posts displaying on the home page and on their own page. We also have a file public/post/index.html that is empty. Let\u0026rsquo;s make it show a list of all posts (not just the first ten).\nWe need to decide which template to update. This will be a listing, so it should be a list template. Let\u0026rsquo;s take a quick look and see which list templates are available.\n$ find themes/zafta -name list.html | xargs ls -l -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html As with the single post, we have to decide to update _default/list.html or create post/list.html. We still don\u0026rsquo;t have multiple content types, so let\u0026rsquo;s stay consistent and update the default list template.\nCreating Top Level Pages # Let\u0026rsquo;s add an \u0026ldquo;about\u0026rdquo; page and display it at the top level (as opposed to a sub-level like we did with posts).\nThe default in Hugo is to use the directory structure of the content/ directory to guide the location of the generated html in the public/ directory. Let\u0026rsquo;s verify that by creating an \u0026ldquo;about\u0026rdquo; page at the top level:\n$ vi content/about.md +++ title = \u0026#34;about\u0026#34; description = \u0026#34;about this site\u0026#34; date = \u0026#34;2014-09-27\u0026#34; slug = \u0026#34;about time\u0026#34; +++ ## about us i\u0026#39;m speechless :wq Generate the web site and verify the results.\n$ find public -name \u0026#39;*.html\u0026#39; | xargs ls -l -rw-rw-r-- 1 mdhender staff 334 Sep 27 15:08 public/about-time/index.html -rw-rw-r-- 1 mdhender staff 527 Sep 27 15:08 public/index.html -rw-rw-r-- 1 mdhender staff 358 Sep 27 15:08 public/post/first-post/index.html -rw-rw-r-- 1 mdhender staff 0 Sep 27 15:08 public/post/index.html -rw-rw-r-- 1 mdhender staff 342 Sep 27 15:08 public/post/second-post/index.html Notice that the page wasn\u0026rsquo;t created at the top level. It was created in a sub-directory named \u0026lsquo;about-time/\u0026rsquo;. That name came from our slug. Hugo will use the slug to name the generated content. It\u0026rsquo;s a reasonable default, by the way, but we can learn a few things by fighting it for this file.\nOne other thing. Take a look at the home page.\n$ cat public/index.html \u0026lt;!DOCTYPE html\u0026gt; \u0026lt;html\u0026gt; \u0026lt;body\u0026gt; \u0026lt;h1\u0026gt;\u0026lt;a href=\u0026#34;http://localhost:1313/post/theme/\u0026#34;\u0026gt;creating a new theme\u0026lt;/a\u0026gt;\u0026lt;/h1\u0026gt; \u0026lt;h1\u0026gt;\u0026lt;a href=\u0026#34;http://localhost:1313/about-time/\u0026#34;\u0026gt;about\u0026lt;/a\u0026gt;\u0026lt;/h1\u0026gt; \u0026lt;h1\u0026gt;\u0026lt;a href=\u0026#34;http://localhost:1313/post/second-post/\u0026#34;\u0026gt;second\u0026lt;/a\u0026gt;\u0026lt;/h1\u0026gt; \u0026lt;h1\u0026gt;\u0026lt;a href=\u0026#34;http://localhost:1313/post/first-post/\u0026#34;\u0026gt;first\u0026lt;/a\u0026gt;\u0026lt;/h1\u0026gt; \u0026lt;script\u0026gt;document.write(\u0026#39;\u0026lt;script src=\u0026#34;http://\u0026#39; + (location.host || \u0026#39;localhost\u0026#39;).split(\u0026#39;:\u0026#39;)[0] + \u0026#39;:1313/livereload.js?mindelay=10\u0026#34;\u0026gt;\u0026lt;/\u0026#39; + \u0026#39;script\u0026gt;\u0026#39;)\u0026lt;/script\u0026gt;\u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; Notice that the \u0026ldquo;about\u0026rdquo; link is listed with the posts? That\u0026rsquo;s not desirable, so let\u0026rsquo;s change that first.\n$ vi themes/zafta/layouts/index.html \u0026lt;!DOCTYPE html\u0026gt; \u0026lt;html\u0026gt; \u0026lt;body\u0026gt; \u0026lt;h1\u0026gt;posts\u0026lt;/h1\u0026gt; {{ range first 10 .Data.Pages }} {{ if eq .Type \u0026#34;post\u0026#34;}} \u0026lt;h2\u0026gt;\u0026lt;a href=\u0026#34;{{ .Permalink }}\u0026#34;\u0026gt;{{ .Title }}\u0026lt;/a\u0026gt;\u0026lt;/h2\u0026gt; {{ end }} {{ end }} \u0026lt;h1\u0026gt;pages\u0026lt;/h1\u0026gt; {{ range .Data.Pages }} {{ if eq .Type \u0026#34;page\u0026#34; }} \u0026lt;h2\u0026gt;\u0026lt;a href=\u0026#34;{{ .Permalink }}\u0026#34;\u0026gt;{{ .Title }}\u0026lt;/a\u0026gt;\u0026lt;/h2\u0026gt; {{ end }} {{ end }} \u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; :wq Generate the web site and verify the results. The home page has two sections, posts and pages, and each section has the right set of headings and links in it.\nBut, that about page still renders to about-time/index.html.\n$ find public -name \u0026#39;*.html\u0026#39; | xargs ls -l -rw-rw-r-- 1 mdhender staff 334 Sep 27 15:33 public/about-time/index.html -rw-rw-r-- 1 mdhender staff 645 Sep 27 15:33 public/index.html -rw-rw-r-- 1 mdhender staff 358 Sep 27 15:33 public/post/first-post/index.html -rw-rw-r-- 1 mdhender staff 0 Sep 27 15:33 public/post/index.html -rw-rw-r-- 1 mdhender staff 342 Sep 27 15:33 public/post/second-post/index.html Knowing that hugo is using the slug to generate the file name, the simplest solution is to change the slug. Let\u0026rsquo;s do it the hard way and change the permalink in the configuration file.\n$ vi config.toml [permalinks] page = \u0026#34;/:title/\u0026#34; about = \u0026#34;/:filename/\u0026#34; Generate the web site and verify that this didn\u0026rsquo;t work. Hugo lets \u0026ldquo;slug\u0026rdquo; or \u0026ldquo;URL\u0026rdquo; override the permalinks setting in the configuration file. Go ahead and comment out the slug in content/about.md, then generate the web site to get it to be created in the right place.\nSharing Templates # If you\u0026rsquo;ve been following along, you probably noticed that posts have titles in the browser and the home page doesn\u0026rsquo;t. That\u0026rsquo;s because we didn\u0026rsquo;t put the title in the home page\u0026rsquo;s template (layouts/index.html). That\u0026rsquo;s an easy thing to do, but let\u0026rsquo;s look at a different option.\nWe can put the common bits into a shared template that\u0026rsquo;s stored in the themes/zafta/layouts/partials/ directory.\nCreate the Header and Footer Partials # In Hugo, a partial is a sugar-coated template. Normally a template reference has a path specified. Partials are different. Hugo searches for them along a TODO defined search path. This makes it easier for end-users to override the theme\u0026rsquo;s presentation.\n$ vi themes/zafta/layouts/partials/header.html \u0026lt;!DOCTYPE html\u0026gt; \u0026lt;html\u0026gt; \u0026lt;head\u0026gt; \u0026lt;title\u0026gt;{{ .Title }}\u0026lt;/title\u0026gt; \u0026lt;/head\u0026gt; \u0026lt;body\u0026gt; :wq $ vi themes/zafta/layouts/partials/footer.html \u0026lt;/body\u0026gt; \u0026lt;/html\u0026gt; :wq Update the Home Page Template to Use the Partials # The most noticeable difference between a template call and a partials call is the lack of path:\n{{ template \u0026#34;theme/partials/header.html\u0026#34; . }} versus\n{{ partial \u0026#34;header.html\u0026#34; . }} Both pass in the context.\nLet\u0026rsquo;s change the home page template to use these new partials.\n$ vi themes/zafta/layouts/index.html {{ partial \u0026#34;header.html\u0026#34; . }} \u0026lt;h1\u0026gt;posts\u0026lt;/h1\u0026gt; {{ range first 10 .Data.Pages }} {{ if eq .Type \u0026#34;post\u0026#34;}} \u0026lt;h2\u0026gt;\u0026lt;a href=\u0026#34;{{ .Permalink }}\u0026#34;\u0026gt;{{ .Title }}\u0026lt;/a\u0026gt;\u0026lt;/h2\u0026gt; {{ end }} {{ end }} \u0026lt;h1\u0026gt;pages\u0026lt;/h1\u0026gt; {{ range .Data.Pages }} {{ if or (eq .Type \u0026#34;page\u0026#34;) (eq .Type \u0026#34;about\u0026#34;) }} \u0026lt;h2\u0026gt;\u0026lt;a href=\u0026#34;{{ .Permalink }}\u0026#34;\u0026gt;{{ .Type }} - {{ .Title }} - {{ .RelPermalink }}\u0026lt;/a\u0026gt;\u0026lt;/h2\u0026gt; {{ end }} {{ end }} {{ partial \u0026#34;footer.html\u0026#34; . }} :wq Generate the web site and verify the results. The title on the home page is now \u0026ldquo;your title here\u0026rdquo;, which comes from the \u0026ldquo;title\u0026rdquo; variable in the config.toml file.\nUpdate the Default Single Template to Use the Partials # $ vi themes/zafta/layouts/_default/single.html {{ partial \u0026#34;header.html\u0026#34; . }} \u0026lt;h1\u0026gt;{{ .Title }}\u0026lt;/h1\u0026gt; {{ .Content }} {{ partial \u0026#34;footer.html\u0026#34; . }} :wq Generate the web site and verify the results. The title on the posts and the about page should both reflect the value in the markdown file.\nAdd “Date Published” to Posts # It\u0026rsquo;s common to have posts display the date that they were written or published, so let\u0026rsquo;s add that. The front matter of our posts has a variable named \u0026ldquo;date.\u0026rdquo; It\u0026rsquo;s usually the date the content was created, but let\u0026rsquo;s pretend that\u0026rsquo;s the value we want to display.\nAdd “Date Published” to the Template # We\u0026rsquo;ll start by updating the template used to render the posts. The template code will look like:\n{{ .Date.Format \u0026#34;Mon, Jan 2, 2006\u0026#34; }} Posts use the default single template, so we\u0026rsquo;ll change that file.\n$ vi themes/zafta/layouts/_default/single.html {{ partial \u0026#34;header.html\u0026#34; . }} \u0026lt;h1\u0026gt;{{ .Title }}\u0026lt;/h1\u0026gt; \u0026lt;h2\u0026gt;{{ .Date.Format \u0026#34;Mon, Jan 2, 2006\u0026#34; }}\u0026lt;/h2\u0026gt; {{ .Content }} {{ partial \u0026#34;footer.html\u0026#34; . }} :wq Generate the web site and verify the results. The posts now have the date displayed in them. There\u0026rsquo;s a problem, though. The \u0026ldquo;about\u0026rdquo; page also has the date displayed.\nAs usual, there are a couple of ways to make the date display only on posts. We could do an \u0026ldquo;if\u0026rdquo; statement like we did on the home page. Another way would be to create a separate template for posts.\nThe \u0026ldquo;if\u0026rdquo; solution works for sites that have just a couple of content types. It aligns with the principle of \u0026ldquo;code for today,\u0026rdquo; too.\nLet\u0026rsquo;s assume, though, that we\u0026rsquo;ve made our site so complex that we feel we have to create a new template type. In Hugo-speak, we\u0026rsquo;re going to create a section template.\nLet\u0026rsquo;s restore the default single template before we forget.\n$ mkdir themes/zafta/layouts/post $ vi themes/zafta/layouts/_default/single.html {{ partial \u0026#34;header.html\u0026#34; . }} \u0026lt;h1\u0026gt;{{ .Title }}\u0026lt;/h1\u0026gt; {{ .Content }} {{ partial \u0026#34;footer.html\u0026#34; . }} :wq Now we\u0026rsquo;ll update the post\u0026rsquo;s version of the single template. If you remember Hugo\u0026rsquo;s rules, the template engine will use this version over the default.\n$ vi themes/zafta/layouts/post/single.html {{ partial \u0026#34;header.html\u0026#34; . }} \u0026lt;h1\u0026gt;{{ .Title }}\u0026lt;/h1\u0026gt; \u0026lt;h2\u0026gt;{{ .Date.Format \u0026#34;Mon, Jan 2, 2006\u0026#34; }}\u0026lt;/h2\u0026gt; {{ .Content }} {{ partial \u0026#34;footer.html\u0026#34; . }} :wq Note that we removed the date logic from the default template and put it in the post template. Generate the web site and verify the results. Posts have dates and the about page doesn\u0026rsquo;t.\nDon\u0026rsquo;t Repeat Yourself # DRY is a good design goal and Hugo does a great job supporting it. Part of the art of a good template is knowing when to add a new template and when to update an existing one. While you\u0026rsquo;re figuring that out, accept that you\u0026rsquo;ll be doing some refactoring. Hugo makes that easy and fast, so it\u0026rsquo;s okay to delay splitting up a template.\n","date":"2015年6月24日","externalUrl":null,"permalink":"/blog/2015/06/24/creating-a-new-theme/","section":"Blogs","summary":"Introduction # This tutorial will show you how to create a simple theme in Hugo. I assume that you are familiar with HTML, the bash command line, and that you are comfortable using Markdown to format content. I’ll explain how Hugo uses templates and how you can organize your templates to create a theme. I won’t cover using CSS to style your theme.\n","title":"Creating a new theme","type":"blog"},{"content":"","date":"2015年6月24日","externalUrl":null,"permalink":"/categories/starting/","section":"Categories","summary":"","title":"Starting","type":"categories"}]