投稿時間:2021-06-15 15:43:02 RSSフィード2021-06-15 15:00 分まとめ(52件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT InfoQ Grafana LabsがGrafana、Loki、TempoのライセンスをAGPLv3に変更 https://www.infoq.com/jp/news/2021/06/grafana-licence-agpl/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global GrafanaLabsがGrafana、Loki、TempoのライセンスをAGPLvに変更GrafanaLabsは最近、コア製品のライセンスを変更する計画を発表した。 2021-06-15 05:55:00
IT InfoQ CNCFはGitOps Fluxをインキュベーションプロジェクトに昇格 https://www.infoq.com/jp/news/2021/06/cncf-gitops-flux/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global CNCFはGitOpsFluxをインキュベーションプロジェクトに昇格CNCFは、Fluxプロジェクトをサンドボックスレベルからインキュベーションレベルに昇格させた。 2021-06-15 05:16:00
IT InfoQ GoogleがAppsheetの自動化機能の一般向け提供を発表 https://www.infoq.com/jp/news/2021/06/google-appsheet-automation-ga/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global appsheet 2021-06-15 05:07:00
IT InfoQ オープンソースAIが暴風雨による停電を81%の精度で予測 https://www.infoq.com/jp/news/2021/06/open-source-ai-storms/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global オープンソースAIが暴風雨による停電をの精度で予測Aalto大学とフィンランド気象研究所の科学者のチームは、暴風雨による損傷によって引き起こされる停電を予測するためのオープンソースのAIモデルを開発した。 2021-06-15 05:03:00
TECH Engadget Japanese Windows 10のサポートが2025年10月に終了へ https://japanese.engadget.com/microsoft-windows-10-054042451.html windows 2021-06-15 05:40:42
TECH Engadget Japanese シーリングライトをスマート家電にすると案外便利でした https://japanese.engadget.com/irktj-060012741.html engadget 2021-06-15 05:40:19
TECH Engadget Japanese Razer、4ポート計130Wの小型GaN充電器を発売。お値段180ドル https://japanese.engadget.com/razer-130w-180usd-053024311.html razer 2021-06-15 05:30:24
TECH Engadget Japanese Twitter、ツイートから自身へのメンションを削除できる「Unmention」機能のコンセプトを公開 https://japanese.engadget.com/twitter-unmention-feature-050021758.html dominiccamozzi 2021-06-15 05:00:21
ROBOT ロボスタ トランスフォーマーが現実世界に出現するかのようなARモバイルゲーム提供へ Niantic×タカラトミー×Hasbroが連携 https://robotstart.info/2021/06/15/transformers-heavy-metal.html 身の回り 2021-06-15 05:48:56
IT ITmedia 総合記事一覧 [ITmedia News] 「薄い本」効果で観客が10倍に 映画「シン・エヴァ」、興収90億円超え https://www.itmedia.co.jp/news/articles/2106/15/news112.html itmedia 2021-06-15 14:47:00
IT ITmedia 総合記事一覧 [ITmedia PC USER] Mad Catz、192kHz/24bitハイレゾ再生に対応したUSB Type-C外付けオーディオアダプター https://www.itmedia.co.jp/pcuser/articles/2106/15/news108.html itmediapcusermadcatz 2021-06-15 14:25:00
IT ITmedia 総合記事一覧 [ITmedia Mobile] Xiaomi「Mi Mix Fold」は折りたたみなのに安い? ライバル機にはない独自機能も https://www.itmedia.co.jp/mobile/articles/2106/15/news110.html huawei 2021-06-15 14:25:00
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 「オフィスグリコ」が全国展開 商品発送→企業側が設置→QR決済で購入の流れ https://www.itmedia.co.jp/business/articles/2106/15/news104.html itmedia 2021-06-15 14:04:00
AWS lambdaタグが付けられた新着投稿 - Qiita AWSLambdaのNodejsでAPIGateway(プロキシ統合)からのevent.bodyがundefinedになる https://qiita.com/st2222/items/3267e31e00b3b253010a AWSLambdaのNodejsでAPIGatewayプロキシ統合からのeventbodyがundefinedになるはじめにAWSLambdaのNodejsでAPIGateway経由でeventbodyを取得しようとした際にundefinedになりハマったので、メモexportshandlerasynceventcontextgteventbodyがundefinedになるJSONparseeventbodyhoge解決した方法以下のように先にif文で確認してからだとundefinedにならない。 2021-06-15 14:46:16
js JavaScriptタグが付けられた新着投稿 - Qiita 【ES2020】自作ライブラリの書き方・読み込み方 https://qiita.com/rpgen3/items/1d1ceaffb0ff01309f7a すべてexportされたモジュールなので一度に動的importして配列をPromiseallに渡しています。 2021-06-15 14:08:04
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) EclipseでMavenを使ってjavaファイルの実行 https://teratail.com/questions/344096?rss=all EclipseでMavenを使って、javaファイルを実行しようとしましたがエラーが発生し、実行できませんでした。 2021-06-15 15:00:01
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) React Routerの【Link to】でページ遷移を実現したい https://teratail.com/questions/344095?rss=all ReactRouterの【Linkto】でページ遷移を実現したい初めて質問させていただきます。 2021-06-15 14:57:44
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) if構文 デバッグ 原因不明 https://teratail.com/questions/344094?rss=all 2021-06-15 14:50:36
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) VMWare PlayerでVMWare Toolsがグレーアウトしてインストールできない https://teratail.com/questions/344093?rss=all VMWarePlayerでVMWareToolsがグレーアウトしてインストールできないやりたいことVMWareで、ubuntuの仮想環境を立ち上げ、VMWarenbspToolsをインストールしモニターに全画面で表示したい。 2021-06-15 14:41:13
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) マイナス方向に遡るOFFSET関数 https://teratail.com/questions/344092?rss=all マイナス方向に遡るOFFSET関数前提・実現したいことGoogleスプレッドシートで以下の画像のように、Aから、A自身を含めてCに記入した数値分画像の例ではつ上方向マイナス方向に遡り、Aから遡ったセルの範囲の中画像ではAAでTRUEが記入されているセルの個数を返す関数を作成したいです。 2021-06-15 14:40:56
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) React.jsにおいて、Material-UIを使用時にuseEffectが実行されない https://teratail.com/questions/344091?rss=all Reactjsにおいて、MaterialUIを使用時にuseEffectが実行されない前提・実現したいことReactjsでフロントエンドの開発を行っております。 2021-06-15 14:39:19
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) javascriptでcreatejs.StageGLを使用したいが、そのために必要な設定を知りたい https://teratail.com/questions/344090?rss=all javascriptでcreatejsStageGLを使用したいが、そのために必要な設定を知りたいお世話になっております。 2021-06-15 14:38:02
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) AWS Lambdaを利用したアプリケーション開発手段 https://teratail.com/questions/344089?rss=all AWSLambdaを利用したアプリケーション開発手段前提・実現したいことAWSのLambdaApiGatewaySRDSなどを利用し、サービス開発をしています。 2021-06-15 14:34:05
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) phpで入力フォームのエラーをjsで書きたい https://teratail.com/questions/344088?rss=all 2021-06-15 14:31:26
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 【アルゴリズム】配列から効率的に値を取得したい https://teratail.com/questions/344087?rss=all 【アルゴリズム】配列から効率的に値を取得したい正解というよりも、皆さんのご意見を頂きたいです。 2021-06-15 14:24:55
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) WordPress プラグイン Download Managerの不具合について https://teratail.com/questions/344086?rss=all WordPressプラグインDownloadManagerの不具合についてWordPressでDownloadnbspManagerというプラグインを使用しているのですが、管理画面の不具合が生じています。 2021-06-15 14:23:57
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) ソケット通信で「8の倍数」を設定する理由 https://teratail.com/questions/344085?rss=all 電文はbyte配列で作られており送信前に↑byte配列がの倍数でなければの倍数になるように変換するというロジックがあります。 2021-06-15 14:17:24
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 【超初心者】JavaScript プロパティの値を設定 https://teratail.com/questions/344084?rss=all 【超初心者】JavaScriptプロパティの値を設定前提・実現したいこと「オブジェクトobjectのnumberプロパティの値をvalueプロパティに設定しましょう。 2021-06-15 14:11:57
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) pythonで2点間の距離を測りたい。複数のテンプレートマッチング。 https://teratail.com/questions/344083?rss=all テンプレートマッチングした同士の単純な距離は測れているのですが複数検知しているテンプレートマッチングしているものとの距離がうまく出ません。 2021-06-15 14:10:54
Ruby Rubyタグが付けられた新着投稿 - Qiita 最大値を配列を使わずに標準出力する方法、配列を使う方法 https://qiita.com/nogizakapython/items/d8e832ca2ec6ce4d0514 最大値を配列を使わずに標準出力する方法、配列を使う方法最大値を配列を使わずに標準出力する方法、配列を使って標準出力に出力する方法の両方を投稿します。 2021-06-15 14:34:39
Linux Ubuntuタグが付けられた新着投稿 - Qiita OpenFOAM8 を LXD 環境にインストール https://qiita.com/ekzemplaro/items/47201941f17377cc2d56 OpenFOAMをLXD環境にインストールOpenFOAMをLXD環境のUbuntuにインストールする方法です。 2021-06-15 14:11:34
AWS AWSタグが付けられた新着投稿 - Qiita AWSLambdaのNodejsでAPIGateway(プロキシ統合)からのevent.bodyがundefinedになる https://qiita.com/st2222/items/3267e31e00b3b253010a AWSLambdaのNodejsでAPIGatewayプロキシ統合からのeventbodyがundefinedになるはじめにAWSLambdaのNodejsでAPIGateway経由でeventbodyを取得しようとした際にundefinedになりハマったので、メモexportshandlerasynceventcontextgteventbodyがundefinedになるJSONparseeventbodyhoge解決した方法以下のように先にif文で確認してからだとundefinedにならない。 2021-06-15 14:46:16
海外TECH DEV Community Create a serverless book library app with HarperDB and Gatsbyjs https://dev.to/atapas/create-a-serverless-book-library-app-with-harperdb-and-gatsbyjs-19cd Create a serverless book library app with HarperDB and GatsbyjsOne of the many advantages of trying out side projects is you never run out of the ideas of trying out something new For example recently I had an opportunity to try out a modern easy to use fast database HarperDB As I learned how to set up and use it I could further explore building a serverless app using it This article will learn how to create a serverless book library app using HarperDB and Gatsbyjs We will also learn to deploy the app on the Gatsby Cloud I hope you enjoy following along and build the app with me So What are we going to learn We will learn to Setting up HarperDB Configure the Schema and Table in HarperDB Populate data in HarperDB Setting up a Gatsbyjs project Use a Gatsbyjs Plugin to access HarperDB data at the build time Build the user interfaces for the book library app It s all with Reactjs Deploy the app on the Gatsby Cloud to access it publicly At any point in time feel free to refer to the source code of the app from the GitHub repository atapas flicks Flicks is a project to showcase the integration between Gatsbyjs and HarperDB It provides a Gatsby based user interface pulling data from the HarperDB So you can assume it to be a library showing information about my favorite books Flicks Know My Favorite BooksFlicks is a project to showcase the integration between Gatsbyjs and HarperDB It provides a Gatsby based user interface pulling data from the HarperDB So you can assume it to be a library showing information about my favorite books Please feel free to fork and change the project in whatever ways you need to If you like the work please show your support by giving the repo a star DemoFlicks is deployed on the Gatsby Cloud You can access it using QuickstartClone the project and browse the project repo Install dependencies using npm install Follow this step by step tutorial to set up data with HarperDB Start the UI using the gatsby develop command Open the code and start customizing The app is now running at http localhost ️ScreenshotsThe Book List PageThe Book Details… View on GitHubHere goes a quick demo of the app that we will build in the next minutes Here is the demo of the library app Please feel free to access and use PrerequisitesYou need a couple of prerequisites You must have Node js installed Please make sure you have installed Node js version gt You can download and install Node js from here You can check the version of the existing Node js installation using the command node v Knowledge of Reactjs would be helpful as Gatsbyjs is React based Before we begin What is serverless anyway There is a high chance that you may have a couple of doubts as I had about the term serverless Does serverless mean there are no servers involved at all in the app development Are we talking about the Serverless Framework by any chance Nope both of them are not true in the context of this article A server exists to provide services It could be e mail form hosting and even database By serverless it doesn t mean there are no servers involved in the app development It instead means we as developers do not set up manage and maintain these servers Instead we leverage the services made available and managed by providers like Google Amazon Netlify Vercel Gatsby HarperDB and many more Coming to the second point above the Serverless Framework is a service that helps us to go serverless However we will not use it in this article HarperDBHarperDB is a fast flexible database that allows you to perform rapid application development distributed computing SaaS and many more To set up HarperDB in a serverless way we need to configure a cloud instance But the first thing first let s create an account with HarperDB Setting Up HarperDBPlease browse to and create an account for free Please click on the link Start Free as shown below If you have an account already please sign in using this link Figure Create a Free AccountAs part of the signup process you need to provide the details like name email subdomain name HarperDB will now create a subdomain for you So please provide the details and sign up for free Figure Specify Details to Sign UpIn the next step you need to provide an account password Please provide a strong password and complete the account creation process Figure Specify the Account PasswordNow let s create a HarperDB cloud instance We will use this cloud instance to create and fetch data for our application Please click on the section Create New HarperDB Cloud Instance to move to the next step Figure Create a HarperDB Cloud InstanceNext please select the Create HarperDB Cloud Instance as shown in the image below Figure Create HarperDB Cloud InstanceNow we have to specify the cloud instance name and credentials Please provide an instance name of your choice along with the credentials Figure Specify Instance Name and Credentials Next you need to select the RAM size storage size and other spec details Please select all the free options Figure Select the specsThe last step is to confirm and add the HarperDB cloud instance Again please review the details and click the Add Instance button Figure Review the instance details and AddYou should see the instance creation getting started Figure Creating Instance is In ProgressIt may take a few minutes However you should see the status as OK after a successful HarperDB cloud instance creation Figure Status OKA final step Please go to the config tab and copy the API Auth Header Key Please preserve it somewhere as we will use it when we configure Gatsbyjs with HarperDB Figure HarperDB API Auth Header KeyThat s all We have successfully created a HarperDB cloud instance that is ready to use Configure the Schema and TableWe need to create a schema and table to insert a few records into the DB To do that load the HarperDB cloud instance from the dashboard First create a schema by specifying a schema name For our app let s give a schema name as library Figure Create a SchemaNext let s specify a table name Let s specify book as the table name and create Please note you have to specify a hash attribute for the table HarperDB will auto generate the value for it You may manually add it if you want to specify its value In our case we will let HarperDB create it Let s specify the id column as the hash attribute for the book table Figure Create a Table Populate data in HarperDBWe will now populate data in HarperDB We will insert a few records of books into the book table using the HarperDB user interface You can insert one record by specifying a JSON object or multiple records at once by specifying an array of JSON objects Let us create a book record by specifying these properties and values author Kyle Simpson cover description No matter how much experience you have with JavaScript odds are you don t fully understand the language As part of the series this compact guide focuses on new features available in ECMAScript ES the latest version of the standard upon which JavaScript is built isbn pages published T Z publisher O Reilly Media rating subtitle ES amp Beyond It covers all aspects of javaScript deep down title You Don t Know JS topic JavaScript website beyond Click on the save icon to save the record Figure Insert a book recordSimilarly you can insert multiple records So please insert a few more records as the book library must contain more than just one book Figure Book RecordsYou can make use of the JSON data from my GitHub Repository to create multiple records Congratulations You have completed the database setup with the required data Now we will move our focus towards building the User Interface for the book library app Gatsbyjs aka Gatsby Gatsby is a React based framework that allows you to build fast secure and robust websites You can create markups with data at the build time and deploy the built artifacts to serve your pages much faster It gives a phenomenal performance and speed improvement over the traditional client server model We will use Gatsby to create prebuilt markups using the data record added to the HarperDB Gatsby Plugin for HarperDBGatsby s massive plugin ecosystem allows us to pull data from several data sources avail themes and many more use cases Unfortunately I couldn t find any existing Gatsby plugin for the HarperDB data source But as they say necessity is the mother and all inventions I thought of creating one So now we have a Gatsby Plugin for HarperDB gatsby source harperdb that allows you to use the HarperDB as the data source so that a Gatsby project can pull the data at the build time You can find the source code of the plugin from here It is also available as an official plugin to install from the Gatsby s plugin page So please give it a try Setting up a Gatsby ProjectAlright it s time to create our gatsby project First install the gatsby command line interface CLI tool Open a command prompt and use this command to install it globally npm install gatsby cli gWe will use the latest gatsby version x to bootstrap our project Gatsby provides many starter projects to get started with the development faster Now let s create a gatsby project Try this command from the command prompt gatsby newIt will ask you a few questions like the site name what kind of CSS library support you need what are plugins you want to install The image below shows my answers You can choose to go with the same or anything else suitable for you Figure Creating a Gatsby ProjectPlease give it a while to complete the installation and set up the project for you Once done you should see a folder created with the site name provided by you in the last step For me it is flicks Please change to the project directory and try this command from the command line gatsby developIt will run the project in the development mode First it will build the project and then host the prebuilt markups from a server locally to access the app By default the app will run on the URL http localhost Please open a browser window tab and try the URL You should see your app up and running Figure The Initial App Configure HarperDB with our Gatsby AppLet s configure the HarperDB with our Gatsby app We will use the gatsby source harperdb plugin Please install it using the following command npm install gatsby source harperdb If you are using yarn try this yarn add gatsby source harperdbNow create a file called env at the root of the project folder Please specify the API auth header key and the instance URL in the env file HARPER DB SECRET KEY API KEY VALUEHARPER DB URL CLOUD INSTANCE VALUEPlease replace the API KEY VALUE with the API auth header key we copied before Also replace the CLOUD INSTANCE VALUE with your cloud instance value The URL ends with harperdbcloud com Please make sure you add an entry of env in your gitignore file You may not want to commit and push this file to your GitHub repository We need to install the dotenv package to read environment variables from the env file You can install it using this command npm install dotenvNow open the gatsby config js file at the root of the project folder It is a file to configure all the gatsby plugins required for the project You may find a few plugin entries already We have installed those while creating the project Add this line at the top of the gatsby config js file require dotenv config Next please add the configuration for the gatsby source harperdb in the config file plugins resolve gatsby source harperdb options secret process env HARPER DB SECRET KEY url process env HARPER DB URL payload operation sql sql SELECT FROM library book type books Please note the options in the above configuration We read the API Key from the env file and use it for the secret value Similarly we get the HarperDB cloud instance URL from the env file and use it in the configuration Next is the payload that we use to query HarperDB Here we are specifying the SQL query to retrieve the data from the book table of the library schema Last specify the value of the type property It can be any string of your choice It is the name under which your data will appear in Gatsby GraphQL queries For example if we specify books as the type name Gatsby will create GraphQL queries as allBooks and books We will see that in a while If you are running the gatsby develop already please stop it using the control c key combination and start again Fetch the Book records in the UIGatsby source plugins make the data available to query using GraphQL queries In addition it provides a GraphQL playground for us to try out the queries before we use them in the app To Open the GraphQL playground and query the book data from the HarperDB please open this URL in your browser tab http localhost graphql You should see the allBooks and books types under the explorer Figure GraphQL ExplorerNow expand the allBooks type from the explorer Then expand the nodes node and select the attributes to query As you select you will see the query is getting built automatically Now execute the query using the Execute Query button at the top You will see the result of the query at the rightmost pane Please refer to the image below Figure GraphQL Query ExecutionWe will now use this query in our UI code React components to build the user interfaces Build the User Interfaces UI Now we will build the user interfaces using this query to show the books in the UI In the UI we will first list all the books with details like title topic cover author subtitle Then when users click on any of the books we take them to a details page to show more details about that book Create the Book Listing PageLet us create the book listing page Open the index js file under the src pages folder Replace the content of the file with the following content Import React Styled Components and gatsbyimport as React from react import styled from styled components import useStaticQuery graphql from gatsby Create Styled Componentsconst Main styled div display flex flex direction column const Container styled div display flex flex wrap wrap justify content center align items center const Book styled div border px solid eee border radius px padding rem width px min height px margin rem const ResponsiveImage styled img width height auto const Title styled span font size px font weight The IndexPage Componentconst IndexPage gt Query the data using GraphQL query const data useStaticQuery graphql allBooks nodes title id author cover rating subtitle topic const books data allBooks nodes books sort a b gt return b rating a rating The Markup to render with the data return lt Main gt lt Container gt books map book index gt lt Book key index gt book topic lt div gt book cover amp amp lt ResponsiveImage src book cover alt book title gt lt div gt lt Title gt book title lt Title gt by lt span gt book author join lt span gt lt p gt book subtitle lt p gt lt p gt book rating lt p gt lt Book gt lt Container gt lt Main gt export default IndexPage Let us go over the code above and understand It is a regular React component where We import React Styled Components and gatsby libraries Create Styled Components for the main page container inside it and each box to show the book information Then we start the IndexPage component In the component we use the GraphQL query to fetch the books data We fetch only the required attributes for the listing page Please notice we use the useStaticQuery hook from gatsby to perform the fetch Gatsby recommends this hook to fetch data using the GarphQL queries inside a Gatsby component We also sort the books based on the rating Last we have the markup to render using the data Now refresh the page where the app is running You will see a list of books with details like the image below Figure The Book Listing Page Create the Book Details PageGreat Let us now implement the book details page It will show a book s details when the user clicks on book information from the listing page Gatsby provides a super cool feature of creating pages ahead in time build time using templates So we can create a single template for all the book details as we will show a similar structure for all the books Create a folder called templates under the src folder Now create a file called BookDetails js under src templates with the following content Import required librariesimport React from react import styled from styled components import graphql from gatsby Create the Styled Componentsconst Container styled div display flex flex direction column align items center const AnchorButton styled a display block width auto height px background ebff padding px text align center border radius px color font weight bold line height px text transform uppercase amp hover color e The BookDetails Componentconst BookDetails data gt const details data books return lt Container gt lt h gt details title lt h gt lt p gt lt span gt By lt span gt lt span style fontSize px gt lt b gt details author join lt b gt lt span gt lt p gt lt img src details cover alt details title width height auto gt Rating details rating lt p style fontSize px gt lt span gt lt b gt Pages lt b gt details pages lt span gt lt span gt lt b gt Publisher lt b gt details publisher lt span gt lt span gt lt b gt ISBN lt b gt details isbn lt span gt lt p gt lt p style fontSize px gt details description lt p gt lt AnchorButton href details website target blank rel noreferrer gt Go to the Website lt AnchorButton gt lt Container gt Gatsby Page Template Queryexport const query graphql query title String books title eq title author cover description id isbn pages published publisher rating subtitle title topic website export default BookDetails We are doing the followings in the template code above Import all required libraries for the template to work Create Styled Components for UI structure to show the book details Then we create the BookDetails React component and render the book details Please note we pass a prop to the component as data It means we are performing destructuring here to extract the data from an object But from which object In a gatsby project pages and templates use the result of a query as the prop Please note the GraphQL query at the bottom of the source code Here we are performing a filter query to filter out a book by its title The result of this query will be passed automatically to the BookDetails component as a prop We extract the data from that and use it for the rendering Now as we have the template ready we need to use it to create the pages for each of the books Let s configure that Create a file called gatsby node js at the root of the project folder with the following content It is a special file that helps in invoking Gatsby APIs and overrides them to customize things const path require path const require lodash exports createPages async graphql actions gt const createPage actions const result await graphql query allBooks edges node title result data allBooks edges forEach edge gt createPage path kebabCase edge node title component path resolve src templates BookDetails js context Data passed to context is available in page queries as GraphQL variables title edge node title Here we are using the createPages API of Gatsby to create pages based on the query First the query fetches all the book titles Then it creates a page using the template for each of the titles and passes the title as a context Each page will be accessed using a unique URL we build with the path attribute Also if you recall we use the title in the template to filter the book information Please note we use the lodash library to utilize its method for formatting a URL fragment Usually a title may have spaces and the URL doesn t accept that So we use the kebabCase edge node title to replace the spaces with a hyphen character Please install lodash as a dependency npm install lodashNow restart gatsby develop once more Next time when the gatsby develop runs it will create the pages for all the books using the template So let us now create a link from each of the books on the book listing page to its respective details page Please open the index js file Include these two imports at the top Other importsimport from lodash import Link from gatsby Then wrap the lt Book gt tag using the Link like this books map book index gt lt Link to kebabCase book title gt lt Book key index gt All the code as previous lt Book gt lt Link gt Please note the to attribute of the Link It links you to the URL fragment created using the title the same way we mapped the pages in the gatsby node js file Save your changes and refresh the app in the browser Now you will be able to click on the books from the listing page Click on a book and you should land on a details page like the one shown below Figure Book Details PageThat s it We have the book library app ready with basic functionality Please feel free to enhance the look and feel of the app using styles You can add features like searching a book filtering many more Deploying on Gatsby CloudWelcome to the last section of the article Now we will deploy the library app to the Gatsby Cloud with a few quick steps At this stage please create a repository on GitHub and push all the code Please Create an account with Gatsby Cloud and Log in Please select the free build and hosting plans while creating the account Next click on the Add a site button Figure Add a SiteSelect the Import from a Git repository option and click on the Next button Figure Select from a Git RepoAssuming you have pushed your code to the GitHub repository please select the GitHub option Figure Select Repository TypePlease provide the repository details and the site name and got to the next step Figure Provide Repository DetailsWe will not use any CMS for our application Therefore you can skip the step of selecting the CMS Figure Skip CMSIn the last step please provide the environment variable details and finish the setup Figure Provide Environment DetailsNow a build should get triggered automatically Once the build is successful the app will be available at https lt YOUR SITE NAME gt gatsbyjs io In my case it is flicks gatsbyjs io Figure Trigger BuildThat s all We have come to the end of this article I hope you found it insightful Thanks for reading and trying out Please feel free to comment below with the link to your app Also feel free to reach out to me if you face any issues in following the article I hope you enjoyed this article or found it helpful Let s connect You can find me on Twitter tapasadhikary sharing thoughts tips and code practices You may also like Why do you need to do Side Projects as A Developer side project GitHub repositories you may find helpfulBuild Test and Publish your NPM I just did it in few minutes 2021-06-15 05:37:59
海外TECH DEV Community I'm switching to vim! https://dev.to/siddharthshyniben/i-m-switching-to-vim-867 I x m switching to vim I just took a short look at the neo vim docs and I m officially moving to neo vim and tmux I have just used it for a few days but I really can feel the power it gives me Not to mention that it really saves my GB ram for other uses A snapshot of my coding sessionAnd I encourage all of you to do the same It really is super faster I come from vscode and it is really faster Vim has everything you need Syntax highlighting Split screen File explorers Autocomplete Tabs Folding lines Indentation autofixing macros line bookmarks integrated terminal like interface and what not I should make an article on it soon Vim is basically equivalent to VSCode for me 2021-06-15 05:07:12
海外TECH CodeProject Latest Articles VRCalc++ Object Oriented Scripting Language :: Vincent Radio {Adrix.NT} https://www.codeproject.com/Articles/1272020/VRCalcplusplus-Object-Oriented-Scripting-Language dynamic 2021-06-15 05:56:00
海外科学 NYT > Science Covid-Sniffing Dogs Are Accurate, But Wide Use Faces Hurdles https://www.nytimes.com/2021/06/12/science/covid-sniffing-dogs.html fields 2021-06-15 05:14:33
金融 ニッセイ基礎研究所 原薬の海外依存リスク-リスク軽減のために何をすべきか? https://www.nli-research.co.jp/topics_detail1/id=68017?site=nli 目次ーはじめにー医薬品の海外依存の状況ー医薬品の欠品問題原薬供給の不具合に伴う供給困難が頻発セファゾリンは海外からの原薬輸入がストップして供給停止に至った薬価の安い後発薬では海外依存が高くなりがちーコロナ禍での原薬調達困難コロナ禍で医薬品や衛生用品などの供給不安が発生政府は補助金を通じて、国内回帰を支援ー医薬品の安定確保に向けた取組み「安定確保医薬品」が指定された供給不安については、予防、兆候把握、供給不安に陥った際の対応がまとめられたーおわりに私見日本の医療用医薬品は、原薬の多くを海外に依存している。 2021-06-15 14:56:56
ニュース ジェトロ ビジネスニュース(通商弘報) 一部の米国非移民就労ビザの審査処理ペース、引き続き遅延傾向 https://www.jetro.go.jp/biznews/2021/06/37a0faa54cddf8b5.html 就労ビザ 2021-06-15 05:30:00
ニュース BBC News - Home The Papers: 'Will we ever be free?' and 'vax to the future' https://www.bbc.co.uk/news/blogs-the-papers-57478106 papers 2021-06-15 05:02:44
ニュース BBC News - Home From teenage tears to European champion: How Cristiano Ronaldo became a Euros legend https://www.bbc.co.uk/sport/av/football/57449011 From teenage tears to European champion How Cristiano Ronaldo became a Euros legendBBC Sport looks at Cristiano Ronaldo s journey at the European Championship from teenage tears in against Greece all the way through to winning the tournament as Portugal s captain at Euro 2021-06-15 05:08:50
ニュース BBC News - Home Euros On This Day - 15 June: Van Basten hat-trick, Gascoigne's Wembley glory and Welbeck's cheeky finish https://www.bbc.co.uk/sport/av/football/53030766 Euros On This Day June Van Basten hat trick Gascoigne x s Wembley glory and Welbeck x s cheeky finishBBC Sport rounds up the best archive action from June in European Championship history 2021-06-15 05:11:53
ビジネス ダイヤモンド・オンライン - 新着記事 米で離職者20年ぶり急増、雇用事情なぜ変わった - WSJ発 https://diamond.jp/articles/-/274130 離職 2021-06-15 14:15:00
ビジネス プレジデントオンライン 「AVのようなセックスが女性を苦しめている」女性向け風俗が求められる深刻な事情 - リスク覚悟で風俗店を利用するワケ https://president.jp/articles/-/46825 女性向け風俗 2021-06-15 15:00:00
IT 週刊アスキー 『モンハンストーリーズ2』最新公式トレーラーが公開!発売後の無料タイトルアップデートも決定 https://weekly.ascii.jp/elem/000/004/059/4059098/ 発売予定 2021-06-15 14:50:00
IT 週刊アスキー Kinera Imperialよりアート作品のようなイヤホン「Nanna(ナンナ)」発売 https://weekly.ascii.jp/elem/000/004/059/4059076/ estbadd 2021-06-15 14:30:00
IT 週刊アスキー 全6種のパンケーキが一度に食べられる! パンケーキ専門店「カフェ・ナチュレ」にて「パンケーキアフタヌーンティー」を期間限定で提供 https://weekly.ascii.jp/elem/000/004/059/4059077/ 期間限定 2021-06-15 14:30:00
IT 週刊アスキー 声優の山口立花子さんがアンバサダーを務める「QoA Mojito New」 https://weekly.ascii.jp/elem/000/004/059/4059081/ qoamojito 2021-06-15 14:30:00
IT 週刊アスキー 『モンハンストーリーズ2』6月25日よりセーブデータを引き継げる「体験版」が配信決定! https://weekly.ascii.jp/elem/000/004/059/4059080/ 発売予定 2021-06-15 14:20:00
IT 週刊アスキー コンパイルのパズルゲーム『パイプライン大作戦』が「プロジェクトEGG」でリリース開始! https://weekly.ascii.jp/elem/000/004/059/4059095/ 配信サービス 2021-06-15 14:20:00
IT 週刊アスキー 崎陽軒からTシャツとタオル!?「昔ながらのシウマイ」「シウマイ弁当」をモチーフにした商品、6月18日発売 https://weekly.ascii.jp/elem/000/004/059/4059075/ 昔ながらの 2021-06-15 14:10:00
マーケティング AdverTimes V6にとっての「なかよし」って?台本なしで語った「ピノ」Webムービーが公開 https://www.advertimes.com/20210615/article354067/ 森永乳業 2021-06-15 05:30:57
マーケティング AdverTimes 間宮祥太朗と女の子が息ピッタリの共演 「クーリッシュ」新テレビCM https://www.advertimes.com/20210615/article354489/ youtube 2021-06-15 05:00:57

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2024-02-12 22:08:06 RSSフィード2024-02-12 22:00分まとめ(7件)