Right way to embed HTML Pages to angular app - html

I am building my own website with Angular2 coupled with Spring boot and postgres as Backend.
The login/logout features are built to perfection but I have trouble understanding how to develop a site like geeksforgeeks where there are multiple links in a page and each page hosts different kind of content.
The idea is large scale and I intend to have lot of pages(topics) as I develop further.
My question is :
1)Should I be creating as many HTML Pages
2)Or What is the standard way of doing it.
I just want to know the right direction, have been scratching my head for quite some time with unsatisfactory solutions.

You should not create as many HTML pages.
Plan to make a category of your type or section of posts
Define templates for each category (e.g. Review something, generic blog post, some solution, etc)
Get the post json from backend along with section or type
Bind it to preferred template to your view

Related

How do I reuse HTML code for different pages just like every popular website in existence?

On almost every website, they have various pages, each having the same HTML code. I strongly doubt that the creators of the websites edit the HTML code of each page, especially when users can make their own pages (like redditors making their own subreddits). These two pages from wikipedia: https://en.wikipedia.org/wiki/Synthesizer https://en.wikipedia.org/wiki/Drum_machine are different pages but they have very similar html code
And I don't even need to have users create their own pages, I just need to have multiple pages that reuse html code. https://www.apple.com/mac/ https://www.apple.com/ipad/ are clearly different pages that have different html code, but I don't think the developers would copy and paste HTML code, change it, then change the code of the headers in each page to include the new page when they have a new product.
https://getbootstrap.com/docs/4.3/getting-started/introduction/ and https://getbootstrap.com/docs/4.3/examples/ are different pages that use the same html code. What do they use? Should I learn bootstrap? I've seen websites do this way before bootstrap was made, though. What's something like this called? Do they even write in HTML or do they write in something that compiles into HTML? How am I supposed to do this very simple task that every webdev knows how to do yet I am unable to find any information on it?
I've tried searching for "Reusing HTML code" but I found nothing that answers my question. All I've seen are special cases
I'm hoping with this, I'll be able to have a website that can have multiple pages that use the same basic HTML code. If I wanted a new tab, I won't have to edit the HTML code of each page.
What you described is achieved by HTML templates and server-side scripting. The server script injects data in your HTML template, thus reusing one template for any number of pages. A template may consist of multiple parts that can be combined to achieve similarly looking yet different pages. It is called dynamic HTML.
Here is a very basic tutorial on how it works: https://www.php.net/manual/en/tutorial.php
To create a modern website you need to use a dozen different technologies together. Here is an infographic to give get idea: https://codeburst.io/the-2018-web-developer-roadmap-826b1b806e8d
They are many ways to do it!
If you are using asp.net you can use master page.
For more info : Master page demo
or else you can use php "include" statement. Suppose you created one page as header.php(header.html) and other one as footer.php(footer.html), then you just have to include those pages.
eg
<?php include 'header.php';?>
<html>your web page</html>
<?php include 'header.php';?>
Well this question is so extremely general it's hard to answer without knowing what your goal is. I highly doubt there are any web developers that develop a website from scratch anymore. Most use a content management system (CMS) which uses server side scripting to serve HTML pieces to form a website. For example header, footer, content-body I don't mean the HTML tags header and footer, although they will be part of the pieces the CMS serves. The most popular content management system is Wordpress, which is built in php. The pages don't even need to be specifically designated, they can be a list of blog posts, a picture gallery ...etc . There are many different CMS packages that serve different purposes and depend on your requirements. Wordpress is in my opinion the simplest with the lowest learning curve and is quite powerful, especially with all of the templates and plugins available. Wordpress itself is free and there are many free templates to start from. However, there are paid templates and plugins that offer additional features. The only thing that you need is php support and a hosting site.
All you need to know can be found here - https://codex.wordpress.org/Getting_Started_with_WordPress
Other content management systems include Joomla, Drupal, Magento, PrestaShop, TYPO3. Each have their advantages and disadvantages, as well as varying support for plugins and templates. Some are designed to support eCommerce sites, such as PrestaShop and TYPO3 but most CMS libraries provide support for eCommerce through plugins and templates.
Bootstrap is a framework, which is a little different from a CMS, but it offers a similar functionality. It serves different pieces or containers you design to form a website or page.
I recommend starting with Wordpress and if you have more specialized needs, check out the other options. I don't recommend you start writing php code to serve pages unless you are a very experienced php coder and even in that case why would you want to if there are so many free open source tools that have already done this for you.

RSS Feed creator - cannot see any content in my website?

http://juniorgoldreport.com/ - is the website I'm trying to create an RSS feed for and SEO better.
https://feedity.com/ - is what I'm using to see if I can create the feed, and then ultimately create an app.
A decent amount of my front page content is built via plugin that organize my post's making the maintenance of the website much easier for me, and allowing my employer to post content with ease as well.
Taking a look at the feed, it seems that the website cannot see anything.
From my understanding these post's are being displayed via a proper HTML format, the have h1 tags and proper div blocks and classes.
Do you guys have any suggestions as to how I should I could go about creating a proper feed? Is this a common issue within wordpress?
I'm currently building another website from scratch with a custom CMS (not via wordpress)
What are you suggestions?
RSS feeds are built into Wordpress. Take a look at this page from the Codex about feeds and how to access them.
As a primer you use http://juniorgoldreport.com/feed/ and get the RSS. If you want to access a specific category you'd use http://juniorgoldreport.com/category/[categoryslug]/feed. You can do the same thing with tags.
As for a non Wordpress site I can't say what the best way would be. There are many options.

Where to store static / "index" page content in database in Rails

I've been using Rails for a few weeks now and have loved using it to make a fully-baked application. Now, I'm trying to use it for an agency site where we have services, articles and projects (which fit models and controllers nicely)
I've created the usual new/edit form views for these and it works perfectly (even have Redactor JS set up nicely with it)
The bit where it all feels a bit awkward is trying to allow for editing on the "index" pages - ie: the Services page itself would not only list each service but would have a few different bits of text and buttons that ideally I'd like to be able to content manage. Ditto for some content on contact pages and the like.
I've looked at using ActiveAdmin (which looks like a great tool, but ideally I'd like to keep it less serious and edit these pages in the front-end, this looks a perfect tool for managing large amounts of data)
Am just wondering how experienced devs would go about this? Would you have a model/controller for every page so that you could have routes like services/edit, home/edit, or perhaps there is some other way? Or maybe I'm just trying to get Rails to do something it's not really made for?
Thanks.
This probably comes down to
who's going to edit these semi-static pages?
how often?
If you're the only one doing it, no more than once a month, then just set up static pages with appropriate controllers.
If a bunch of people are doing it, on a fairly frequent basis, then go with ActiveAdmin, or a CMS gem, or etc.
Don't let 'elegant' get in the way of 'just do it'.

Common ways to target links?

Are iframes still widely in use today?
I am coding a site with divs, and I want everything to appear in the container div. Is it possible to do it without coding the header + nav into each page and have the content show at the exact same spot without using iframes?
I did a quick Google search and found a post that said it's not possible, but my site will have quite a bit of links.
As of right now, I am coding it with Tumblr, and the hashtags in the posts would act as links to a section of posts (Ex: #blog would retrieve every post under the "blog" link). What are some widely used ways to target links on a website?
If you are creating a multi-page website, it would be helpful to have the HTML content be generated dynamically or be built statically from template files. You don't want to manually update the same content across multiple HTML files.
Dynamic Pages
There are several options for dynamically generating HTML content depending on the software available to you. For example, PHP is a popular language for web development and is available through many web hosts.
Static Pages
It is possible to build static HTML documents from templates using something like Jekyll.
I'm not sure if I'm interpreting what you mean by "coding it with Tumblr" correctly or not, but I think you mean you're making a Tumblr site with their built-in HTML editing capability.
I think you'll have a very difficult time achieving the behavior you desire there. I think you're trying to create something resembling a single-page application. Tumblr probably just allows basic static HTML with little Javascript. The suggestion Kyle made about using PHP or something like that won't work because that code must be executed on a server, and Tumblr doesn't provide that capability to my knowledge.
If you really want this kind of functionality, you probably should get some paid web hosting and develop your web development skills. It's not a simple task, but it's fun!
Sorry if I underestimated you or anything. Just trying to read between the lines. It seems to me that you may be relatively new to web development given the content of your post, and I'm trying to nudge you in the right direction constructively.

Generating a static website from a set of content data (possibly with webgen, webby or a similar toolkit)

My company (an engineering firm) is looking to redesign their website with some dynamic content. We have a nice portfolio of projects that we'd like to present on our site by category.
To elaborate, I'd like to have a "Projects Category" menu, where you can choose a sub-project category (such as churches, schools, etc) which links to a page with images of all projects which have been tagged with that category attribute. Clicking on an image would then take you to a detailed page for that project.
I have done a good bit of asp and jsp page development, but I've always worked on the front end in an enterprise environment - I've never built a production site from the back end. The advice I've gotten so far is that a full-blown CMS solution would be somewhat overkill, as we won't have a large hit count, and we'll be displaying a few hundred projects at most.
One big-picture choice I appear to have - whether to dynamically generate the pages (with asp or jsp) or to use a tool to generate a set of static html pages. The tool would build the menus, project summary pages, and individual project pages based on a set of data I could provide (in the form of a database or text file.)
I'm leaning towards trying to use a tool like webgen or webby to statically generate the site due to our current web hosting situation. Any thoughts on which approach is more appropriate? Is webgen or webby capable of doing what I am trying to do? Or can anyone recommend other web authoring tools better equipped to accomplish this?
Thanks for any feedback!
You could always use Template Toolkit :)
Jekyll may be worth a look.
Refer: https://github.com/jekyll/jekyll/wiki/
I've been told that webgen can't do what I'm trying to do (without some manual coding extensions myself) but that nanoc can.
http://nanoc.stoneship.org/