The design of a Stylish Static website with Eleven (11ty) (r) (r)

Apr 22, 2023

Hello World!

In the event that you enter the [email protectedemail protected/eleventy command and run the command the command, it will result in the establishment of a public directory. is a publicly-accessible directory that is made by the static file that is generated. It is likely that you want access to this via your web browser. It is also possible to set hot reloading options. The procedure is carried out in this manner:

Npx @11ty/eleventy

This will serve your site on http://localhost:8080/.

The commands can be difficult to recall and remember regularly. You already added them to familiar syntax in your package.json file, so you can use npm start to serve your application to http://localhost:8080/.

How do I best to build a static portfolio by using

The best way forward is now clear. you can build an online presence with Eleventy. Create your profile first.

Create a brand fresh Eleventy project at the beginning. The project could include images, CSS and even the content of your app, therefore we've developed a GitHub template for your repository in order to make it simpler for you to get the job done. With GitHub it is possible to select the template to make a totally new repository and move the repository's files as well as the configuration files that were initially created into the personal repository you control for saving to your personal computer.

Your proposal must follow the following format:

+--node_modulespublic+/Includes LayoutsAssets- CSS +- index.njk +index.njk + .eleventy.js + .gitignore + the package.lock.json package.lock.json +package.json + package.json

Which are the most effective templates for use in Eleventy

When you're working with Eleventy you can find three distinct kinds of templates you should know about. Templates are designed with Nunjucks that permit users to design variables and loops, conditionals and loops, and other types of logic that could be utilized to construct the content of a page rapidly.

  • Page Templates The templates set the layout and design of each page that you host on your site.
  • Layout Templates The HTML0 Layout Templates specify the structure and general style of your website's page(s). The layout templates typically have elements including headers, navigation menus sidebars, and footers. They are typically used across several pages.
  • Parts Templates These are tiny, reuseable elements of your site's HTML markup. These are usually used to specify the fundamental elements like feet, menus for navigation, or sidebars and headers. They are included in page layout templates and designs.

The basic design of the templates. They can be redesigned to build a static portfolio.

What Layouts Can I Create using Eleventy

For the directory containing src It is also possible to create it the "_includes" directory. It contains all layouts as well as any other part.

You can then make designs directories (for the purpose of arranging) for the storage of every layouts. Layouts are the designs. They're designed using your preferred design language similar to Nunjucks which we're using.

Create a base.njk file to maintain your layout on all of your pages.

J. 's secure Safe /htmlSecure safe Secure /htmlin|Secure/html,in|Secure/htmlin} the above code The basic HTML markup is created in addition to Font Awesome is included from the CDN which gives you access to the icons. Furthermore, the diverse elements used to create the content is designed to ensure that all aspects of the website using the style is protected. It's just not the complete all-encompassing story of design. The design you decide to utilize will feature elements which appear all over, such as the navigation bar and also the footer. The partials you choose to use can be built from all of these areas. How do you use partials within Eleventy All partials? Partially-created files are kept in the directory called _includes. To make sure they are well-organized, they should be kept in separate folders. To do this then you'll need to make an individual folder in the directory named _includes. Then, you can make templates for your footer, as well as an navigation bar. Here are the Navbar elements that can be located in navbar.njk: J. " HTML0 Projects and Resumes Resumes resumes and projects Following is the data in the footer found in footer.njk footer.njk: (c)  the percentage year that Joel's Portfolio is The portfolio Joel's Portfolio the parts of his website. This can be done by adding the word "jolly . The format you choose will be what will appear in the layouts/base.njk template should display with the footer and navbar templates using the following format. 's Portfolio % include "components/navbar.njk" % content % include "components/footer.njk" % If you execute the NPM launch command, this layout will not appear because it's not included in a template page. Create a template with the layout. How to make Page Templates with Eleventy. In the src folder, it is possible to create index.njk. index.njk. index.njk documents could be utilized for the homepage page on your portfolio site. It will be constructed by selecting the layout that you have selected as the base layout: The layout layouts/base.njk Title"Home. It's an itle"itle"|"Itle" Page|page|page|Page}. When you run the npm start command now, your static site will load on http://localhost:8080/. The website should appear as a Page Template, without styling by using CSS and images by using Eleventy. The current templates are the ones available and the way they function and the way they work. However, in the layouts/base.njk file it is the CSS files will be employed to construct portfolio pages. But, when the site is loaded, the CSS styles don't change because the CSS file is not within the directory that is available to all users. To fix this you must change the configuration of the . eleventy.js file using the attribute eleventyConfig. This lets Eleventy to check if any CSS file(s) exists, as in addition to keeping the track of any modifications that could be added on the CSS file. The src directory is the place where you're able to make the CSS folder the residence of every CSS file you'll need for your project. However, in this particular post, it's possible to make use of only single CSS document: global.css. It is then possible to set up the CSS folder to can be configured to use all the files in the folder: eleventyConfig.addPassthroughCopy('src/css'); eleventyConfig.addWatchTarget('src/css'); Same thing applies is true for images. If you upload images on your site, you will notice the picture isn't being displayed. To enable the picture to be displayed, it's essential to set up the area where pictures will be placed into. Make a folder to show the images that we wish to display, and then make sure the folder is set up to hold assets. eleventyConfig.addPassthroughCopy('src/assets'); This is what your configuration file should have: module.exports = function (eleventyConfig) eleventyConfig.addPassthroughCopy('src/assets'); eleventyConfig.addPassthroughCopy('src/css'); eleventyConfig.addWatchTarget('src/css'); return dir: input: 'src', output: 'public', , ; ; When you run npm begin then the CSS styling will work as well, and your home page appears like this: Layout appearance is after template has been included Creating Partials and Adding To the Home Page You have now succeeded in designing a layout, and then adding it to your homepage ( index.njk). It's possible to modify the page that is your home on your website, to show certain information about yourself, such as your personal information, as well as your personal experience as well as the information you've given for your contact. Include your code and markup directly into index.njk. index.njk template. It is also possible to create unique Paratials to display your information website, your website's homepage, and your contact details. This Hero Paratial is the primary part of the Navbar which's primary purpose is to present users with specific information regarding the features that your website has to offer. "hero-text"Hello Hello! I'm Joe My name is Joe.I'm an experienced software developer located in Lagos, Nigeria. I'm a pro at creating (and frequently creating) beautiful websites, applications as well as other items within. A few details about you are contained in the code below together with icons from social media sites which link your profile to links on social media sites. Your Hero section on your profile should look similar to this: Hero display It is possible to include additional information within the Hero section. Also, you can modify the layout of the css/globals.css document, as well as create your personal design of your area. The About Partials About Parts Section will inform people who visit your profile information about the personal details you provide, according to the amount of information that you'd like to disclose. There is also a separate page should you need to include additional details you wish to provide. About Myself and About Myself "p>As the developer as well as a web-based developer, I've always been interested in creating sophisticated and efficient solutions for complicated issues. I'm an expert in domain of software development and web-based technology, including HTML, CSS, and JavaScript. I enjoy being part of the front - and back-end elements of software. I'm constantly seeking ways to boost effectiveness, improve the user experience, and ensure I'm able to provide top-quality code. As an experienced professional, I've been engaged in many jobs that range from most basic static web pages to sophisticated enterprise-grade software. I'm skilled in utilizing diverse tools to develop along with frameworks which include React, Angular, Vue.js, Node.js, and Laravel. I'm always looking to learn ways to improve my skills and learn about new technologies and am always looking for new ways to increase my skills and understanding. This code is an assortment of details about you (an image, and the specific words). This is the way that the About section will display. Skill Parts about This area was designed to highlight the program you are using. Skills HTML CSS Skills HTML JavaScript HTML CSS JavaScript HTML CSS HTML3 HTML CSS HTML CSS JavaScript React Node HTML13 Python This program creates an image card which displays gorgeous font icons and also the names of every skills. It is also possible to make different styles in addition to altering the code so that it appears more appealing and unique. The section on Skills must be a reflection of the following Parts. The Contact Parts As this is a portfolio it's important to provide the possibility for prospective customers to get in touch with you. The most effective method is to have clients in a position to contact you via email. Contact me by email if you'd prefer to work together with queries or have me speak at your next meeting My email address is open 24/7. If you would like to get together to meet up, I'll make sure to respond to your email! Thanks! "Hello" We'd like to hear from you! Hello! Modify the email address that is displayed on the tag so that it corresponds with your own email address. Utilize the tag to display your email address. you will be able to connect with an email service in order for your customers to contact them. Contact partials It's now possible to build every component on your homepage. Next, you need to incorporate them into your index.njk file so they appear on the home page: --- layout: layouts/base.njk title: Home --- % include "components/hero.njk" % % include "components/about.njk" % % include "components/skills.njk" % % include "components/contact.njk" % When you run the start command, the homepage will display the additional Partials accordingly. What are collections in Eleventy? The term "collection" refers to a set of data that can be used with Eleventy's collection feature. allows you to group closely related content in the order that lets you make pages upon these data. If, for example, you have markdown files that contain similar content (blog posts) that are stored in the blog folders in the program you are working with, you are able to utilize collections to locate the posts and display a list of every post. In addition, you could design a layout that will determine what posts appear. The collections are explained inside the .eleventy.js configuration file. They may contain data taken from a variety of sources like Markdown file or JSON files. To create a portfolio site We'll create an individual folder to each project in the directory src in order to keep the markdown files associated with every project. The website's content must include specific details about the project, such as the way they came up with the solution, the technique used, challenges faced, along with the experiences that were gained from. You can create a markdown file with the name of the project (quotes-generator.md) and paste the code below: --- title: Quotes Generatordescription: "Helps you generates quotes of around 1600 quotes by various authors . Quotes are automatically transferred onto clipboards." gitHubURL: "https://github.com/olawanlejoel/random-quote-generator" image: "/assets/quotes-banner.jpeg" --- The quotes generator project is a software tool designed to display random inspirational or thought-provoking quotes to users. The goal of this project is to diminish the feeling of determination and inspiration by offering users accessibility to motivational quotes. The technology used for this project consists of HTML, CSS, and JavaScript. The application makes use of an API for gathering random quotes, and then give users the quotations. The lessons learned and the difficulties one of the most difficult issues to be faced throughout the process was creating the interface for users to appear attractive and be adaptable to different gadgets. The group had to take into consideration various features, including text size along with the colors and layout so that they could create user-friendly and enjoyable interface. A different challenge was tackling imperfections and edges, such as connection issues due to the internet, or issues with API responses. It was crucial to design the corrective and fallback procedures to ensure that the system was capable of performing efficiently in many different situations. They learned important knowledge regarding front-end programming, including the necessity of creating codes that are clean, effective in identifying problems and fixing them, as well as flexible design concepts. They also realized the importance to use APIs for access to and present information gathered from different sources. It was a challenging task to develop quotations. proved to be a valuable learning experience that enabled the team to increase their understanding of technology and in the process of developing a tool that is effective for those who seek inspiration and motivation throughout their lives. If you've already taken a look at our starter templates it is likely that you have them. If not, download them from the directory for your starter template page on GitHub. The front part of the document, like templates, makes it possible to integrate them into templates. Since the Markdown documents are stored in the directory called src Eleventy interprets them as being templates. It then creates an HTML web page for every one of the documents. Their URL will be something like /projects/quotes-generator. The appearance of the project with no layout Eleventy can't decide the style of these sites since they aren't equipped with the layout component within their content. In the beginning, it is essential to draw an outline for the content before making an array. After that, you'll be able to add an array on the dedicated page of your work. As before, you'll have to construct your outline ( project.njk) inside the directory for layouts. To avoid duplicates, because your layout files are built on the standard HTML markup, you'll need to edit it so that you can modify it to alter the base.njk layout. The process involves creating blocks which represent the part of the layout has changed. J. 's Portfolio % include "components/navbar.njk" % % block content % safe % endblock % % include "components/footer.njk" % The block is given a name content due to the fact that you are able to have multiple blocks within your template. You can add it into an existing project.njk layout. This means that you must determine the content of the block by using "layouts/base.njk" Block Content ContentBlock Block itle "itle" It's out there, and it's accessible. It's available throughThe block is available through|accessible through|on} GitHub GitHub Endblock on GitHub is safe and secure. GitHub Endblock is safe and protected Secure Endblock.Endblock is safe... secure.|It's safe.|The endblock is safe.} This code shows how to specify the manner in which your information should appear. The code will display the title, image as well as the URL of the github on the front matter, and will later add more content with the variable content ( safe safe|secure|secured}). The next step is to add the importance of the layout as well as importance to every component that is part of front matter's >--- design layouts/project.njk Description Summary of the Title for Quotes Generator "Helps to create quotes using over 1600 quotations by a variety of writers . Quotes automatically copy into clipboards that are part of your personal computers." gitHubURL: "https://github.com/olawanlejoel/random-quote-generator" image: "/assets/quotes-banner.jpeg" --- ... If you visit the URL of each project, e.g. /projects/quotes-generator, you will notice it now uses the created layout: Layout and appearance of the project How to Use Collections in Templates Your projects are all is displayed in a pleasing manner with the chosen layout, but how can users access the projects? Another option is to create a lists of the collections accessible to anyone for permission to access the work. The reason for collections is since they are accessible. For a collection to be utilized, it has been created, and it must be defined within the .eleventy.js configuration file, using the addingCollection() method. module.exports = function (eleventyConfig) // ... eleventyConfig.addCollection('projects', (collection) => return collection.getFilteredByGlob('src/projects/*.md'); ); return // ... ; ; In the code above, in the code above, use of the addCollection() method is employed to create a collection called projects. A callback function supplied to the method addCollection() will return all Markdown documents that are in the directory of projects with the help of the locateFilteredByGlob() method. Once you've created your collection, you'll be able to use templates to build pages built using the resources. Let's create the projects.njk template for a website which uses the base.njk layout. The content on it will contain the project that is in the collection. --- layout: layouts/base.njk title: Projects --- Projects % for project in collections.projects % project.data.title project.data.description Read more % endfor % In the code above, the % for % phrase is used to go through the entire projects from the collection to generate a new plan card each one. Access to all variables using project.data.[key[key]. Like you've seen in the previous example code it displays the name of the project, along with its description and it's GitHub URL. You'll also have the ability to browse to the project's URL via project.url. If you execute the command to begin by going to the project's page, and then select projects, the page will show up like this in the event you've created multiple templates. Template Page to Projects Do You Use Shortcodes? Shortcodes may be utilized to indicate the use of certain HTML tags as well as JavaScript dynamic variables are reuseable in templates you design. It is possible to use, for example, an html shortcode that generates dates for the year in question and then include the information on your site. In the .eleventy.js configuration file, it is possible to define the shortcode you would like to include with the aid by an addShortcode() function. For example, the following code defines a specific shortcode known as year: module.exports = function (eleventyConfig) // ... eleventyConfig.addShortcode('year', () => return `$new Date().getFullYear()`; ); return // ... ; ; The year shortcode above returns the year currently in use and you are able to add it to any template in the scope of your work. In order to illustrate the fact that you're not writing your year in the footer area of this site. Include it by using %, and it'll update each year. (c) Year Joel's Portfolio ... If a webpage displays it, its results contains the date of the year in the HTML the tags of p. Which is the best method to incorporate this data? Theme of an Eleventy Site A theme on the Eleventy website is an best way to alter the look and feel of. your site quickly. It's easy to set up your site and running. Eleventy is a brand that can be used to refer to themes as the basis for your website, however keep in mind the fact that these terms can be used frequently to describe similar things. Numerous websites offer free Eleventy themes. There are Eleventy starters which are official along with Jamstack themes. All you have to do is choose the theme you prefer or the launcher, then visit the GitHub repository, and save the files to your desktop. You should read the guide for how to configure and alter the themes. Run npm install to install all packages used, and then run npm start to serve your application locally to http://localhost:8080/. How do you go about creating an Eleventy website? You can create a stunning portfolio website with Eleventy. It's not possible for this kind of site to be saved locally on your PC. This isn't enough. It's better to host your website online, so that sharing is accessible to everyone. Launch your Eleventy website using GitHub Once you're done with the uploading of your files to GitHub and then GitHub It is important to make your .gitignore file, so it can be used to define the specific files and folders for ensuring that Git does not miss anything when publishing your source code. You should create the .gitignore file in your root directory. The file should include the following information for dependencies: # dependencies /node_modules After running /public, you'll be able to begin with your own local Git repository by using your terminal. Choose the repository that hosts your project, then using these steps: Git init Now add your code to the local Git repository using the following commands: git add You may then edit your code by using the following commands: Git commit"my initial commit "my first commit" Make sure you could substitute "my the first commit" with an easy explanation of your modifications. Then, you can upload your code to GitHub using the following steps with the following steps: Remote Git add sources (repository's URL) Gi push -u source master Note: Make sure you substitute "[repository URL" by your personal GitHub repository URL. Once you've completed these steps then your code will be uploaded on GitHub and accessible via your repository's URL. Now you can design your own website that is deployable ! After that, you are allowed to make your Eleventy website by using the button Applications at the bottom of the sidebar. After that, select Add Service. Select Add service after which select the drop-down menu. Enter the host address of the program. A window with a modular design will be displayed. It will allow you to be in a place to select the repository you'd like to set up. Select the branch you'd like to create in the event that there are several branches within the repository. Following successful installation, Jekyll static websites will begin the process of deploying. In only a couple of minutes, you will receive an access link to the most current version which is added to your site. In this case, it is https://ty-portfolio-lvjy7..app/ Summary In this article you will learn how to craft a stylish site using Eleventy, as well as different ways to modify an Eleventy static website starting from scratch, and how to build an attractive portfolio site. If you're planning to create your own personal blog, portfolio website, or even an online shop, Eleventy can help you reach your goals in minimal effort and at the most effective. Therefore, why not make an effort today to find your options? What are your thoughts about Eleventy? Have you ever used Eleventy in order to make or design anything? Please share your ideas as well as your own experiences within the comments section on the right. My dashboard is easy to create and controlled via My Dashboard. My Dashboard support is available 24/7. My Dashboard helpline is open at all hours during the day. Most reliable Google Cloud Platform hardware and network powered by Kubernetes to provide the most scalable high-end Cloudflare integration, which will allow your business grow, as and provide security. Connecting to the global audience via 35 data centers which include more than 275 POPs as well as being the home of 35 data centers.

This post first came up on here

The original article appeared this site

Article was posted on here

Article was first seen on here