• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Web Design and Development |OT| Pixel perfect is dead, long live responsive design

Zakalwe

Banned
Hey all.

What would be the simplest solution to dynamically pull through the 3 latest blog posts from my client's Medium to their website?

Ideally I'd like it to be linked so whenever they update their blog on Medium, it automatically updates their website with the newest post at the top, knocking the bottom post off.

Any help would be really appreciated, cheers!
 

D4Danger

Unconfirmed Member
Hey all.

What would be the simplest solution to dynamically pull through the 3 latest blog posts from my client's Medium to their website?

Ideally I'd like it to be linked so whenever they update their blog on Medium, it automatically updates their website with the newest post at the top, knocking the bottom post off.

Any help would be really appreciated, cheers!

you can get an RSS feed from medium by putting /feed/ in front of the url like https://medium.com/feed/the-story and from there you just need to parse the first three <item>s.

parsing RSS feeds is easy enough as it's just an XML document. You should be able to find a million examples for whatever setup you're using.
 
So, I set up my business website using Wix. It is indexed in Google and all.

I signed up on moz.com trial just to look at SEO optimization, and Moz said their crawler can't look at Wix websites because Wix serves all content via JS.

Does Google have the same issue?

When I do crawler Fetch+Render, I see the website generated normally, crawler sees the website same way as a user would.

If this causes a lot of issues, I may need to look at switching to building out a website which will be a lot more time consuming.

This site : http://searchengineland.com/tested-googlebot-crawls-javascript-heres-learned-220157 says Google crawler has no issues with dynamic content anymore.
 
So, I set up my business website using Wix. It is indexed in Google and all.

I signed up on moz.com trial just to look at SEO optimization, and Moz said their crawler can't look at Wix websites because Wix serves all content via JS.

Does Google have the same issue?

When I do crawler Fetch+Render, I see the website generated normally, crawler sees the website same way as a user would.

If this causes a lot of issues, I may need to look at switching to building out a website which will be a lot more time consuming.

This site : http://searchengineland.com/tested-googlebot-crawls-javascript-heres-learned-220157 says Google crawler has no issues with dynamic content anymore.

You should be fine, I imagine. You should be able to tell from the index status page. If it seems like it is crawling all of your pages then you should be ok.
 
So, I set up my business website using Wix. It is indexed in Google and all.

I signed up on moz.com trial just to look at SEO optimization, and Moz said their crawler can't look at Wix websites because Wix serves all content via JS.

Does Google have the same issue?

When I do crawler Fetch+Render, I see the website generated normally, crawler sees the website same way as a user would.

If this causes a lot of issues, I may need to look at switching to building out a website which will be a lot more time consuming.

This site : http://searchengineland.com/tested-googlebot-crawls-javascript-heres-learned-220157 says Google crawler has no issues with dynamic content anymore.

The last point isn't entire true. Dynamic content still performs worse than static content, but it's not the end of the world. Google has gotten much better at crawling dynamic content and seeing the page as a user would see it, but it still performs worse with sites generated dynamically.

Though, I'm surprised that Wix generates their templates dynamically, because so much of the Wix system is a wholesale ripoff of WordPress, and WordPress doesn't generate content dynamically from JavaScript
 
You should be fine, I imagine. You should be able to tell from the index status page. If it seems like it is crawling all of your pages then you should be ok.

The last point isn't entire true. Dynamic content still performs worse than static content, but it's not the end of the world. Google has gotten much better at crawling dynamic content and seeing the page as a user would see it, but it still performs worse with sites generated dynamically.

Though, I'm surprised that Wix generates their templates dynamically, because so much of the Wix system is a wholesale ripoff of WordPress, and WordPress doesn't generate content dynamically from JavaScript

Thanks guys.

I guess for now I will stick with this. I expect, 90% of my hits to be paid anyway due to targeting of very broad keywords.
 

Cptkrush

Member
Hey guys, I'm in the process of learning about js frameworks and I'm gravitating toward Angular. Is it worth learning Angular 1.x? I keep hearing that 2 is totally different, but aren't most companies going to stick with 1.x until they can transition easily? Should I learn both?
 

grmlin

Member
Try it and see if you like it maybe? Angular 1 is used by a ton of sites, I'm still not convinced Angular 2 will be the same in some years.
 

Kalnos

Banned
Only reason to learn Angular 1 at this point IMO is if you're working on a legacy project or are interested in applying to a company that's using it on a legacy project. I don't think you can go wrong between Vue 2, Angular 2, or React. Ember can also be a good choice too if you're looking at a company that uses it.
 
Domain names are cheap and look more professional if available, i.e. BobRoss.com > BobRoss.geocities.com. If you're looking for WYSIWYG to develop then I'm not sure GitHub Pages is for you, maybe someone here has a better alternative.

Are domain names a one time pay or yearly? Also I developed my own portfolio since I can customize it more this way.So all I will need besides the domain is a host. I was thinking about getting hosting but is it not worth it at all?
 
Are domain names a one time pay or yearly? Also I developed my own portfolio since I can customize it more this way.So all I will need besides the domain is a host. I was thinking about getting hosting but is it not worth it at all?

Domain names are paid yearly. Hosting is generally monthly but can be paid a year or more at a time for a discount, usually.
 

this_guy

Member
Where do you recommend I get a domain from? Is go daddy any good?

Go with Google Domains. It's $12/yr for most domain names (.com, .net, .org, etc) which is similar to other domain registrars, but Google allows you to have privacy protection turned on without paying an additional fee. For example, GoDaddy charges $7.99/yr for this feature.

For reference sake, anyone can find out who owns/registered a domain online. Without the privacy protection people will see your name, address, email, etc.
 

Kelsdesu

Member
What do you guys use to host your porfolios? (If you even use them)

I am looking to get out there and want to know.

Thanks yall.
 

Zakalwe

Banned
Quick question: In my latest client build I've included a spot for their latest blog post (click on the Media tab).

How much difference will it make between setting it up to pull the latest blog post through dynamically or leaving it static and updating it myself when the client makes a new blog post (which I don't mind doing as it will only be once a week)?

I know static pages are better for SEO than dynamic, but is the difference here worth worrying about?
 

D4Danger

Unconfirmed Member
Quick question: In my latest client build I've included a spot for their latest blog post (click on the Media tab).

How much difference will it make between setting it up to pull the latest blog post through dynamically or leaving it static and updating it myself when the client makes a new blog post (which I don't mind doing as it will only be once a week)?

I know static pages are better for SEO than dynamic, but is the difference here worth worrying about?

imo you should find a way to automate the process. You don't want to leave yourself on the hook for endless updates and it's better for them if you were to ever stop.

when you say dynamically I assume you mean with javascript. can you do it on the backend with php or something?
 
Quick question: In my latest client build I've included a spot for their latest blog post (click on the Media tab).

How much difference will it make between setting it up to pull the latest blog post through dynamically or leaving it static and updating it myself when the client makes a new blog post (which I don't mind doing as it will only be once a week)?

I know static pages are better for SEO than dynamic, but is the difference here worth worrying about?

Absolutely automate it. You're inviting trouble if you say you'll update it manually even once a month. Plus, does your client want to wait for you to have to update the website...? The work to automate this is small, especially if they're using a common blog publishing system like WordPress or anything normal.

There are virtually no negative SEO impacts on pulling the latest post and displaying it dynamically, even with JavaScript. IF you can display it server side, sure that's better, but generally, the ref from their homepage to their own content via JS is going to be inconsequential in terms of SEO.

Also... IMO, clean up your source. That whole "Site designed and built by tetrisforkicks..." comment in the source is busch league and distasteful.
 

Zakalwe

Banned
Absolutely automate it. You're inviting trouble if you say you'll update it manually even once a month. Plus, does your client want to wait for you to have to update the website...? The work to automate this is small, especially if they're using a common blog publishing system like WordPress or anything normal.

There are virtually no negative SEO impacts on pulling the latest post and displaying it dynamically, even with JavaScript. IF you can display it server side, sure that's better, but generally, the ref from their homepage to their own content via JS is going to be inconsequential in terms of SEO.

Also... IMO, clean up your source. That whole "Site designed and built by tetrisforkicks..." comment in the source is busch league and distasteful.

Thanks for the advice, both of you.

Source is still in dev mode as stuff needs to be done. It'll be tidied up when we've finalised everything. The comment you mention is staying, I think it's absolutely fine but I appreciate your opinion.
 

Somnid

Member
I can't wait until native js imports are ready. AMD, Common and transpiled import statements with module loaders need to all die in a fire. Unfortunately node.js has likely doomed us all.
 

Blunoise

Member
Just joined freecodecamp.com and I like it a lot heard some good stuff and ppl getting jobs quick.any one heard of this?
Thinking about slowing down at teamtreehouse for $100 a month for a tech degree when I can learn the same stuff for free. Any opinions?
 

capawe

Neo Member
I was wondering if I could get some feedback on my first FreeCodeCamp project http://codepen.io/PhillFlippy/full/oBXVPx/

I had a friend take a look at it and he said my view button wasn't working for him, but I tried it on multiple devices and I can't see the problem. I am pretty new to web development so I am not sure if I am on the right track.
 

Somnid

Member
I was wondering if I could get some feedback on my first FreeCodeCamp project http://codepen.io/PhillFlippy/full/oBXVPx/

I had a friend take a look at it and he said my view button wasn't working for him, but I tried it on multiple devices and I can't see the problem. I am pretty new to web development so I am not sure if I am on the right track.

Works for me. Also take $("button") and save it to a variable. That way you aren't doing a lookup every single time.
 
I was wondering if I could get some feedback on my first FreeCodeCamp project http://codepen.io/PhillFlippy/full/oBXVPx/

I had a friend take a look at it and he said my view button wasn't working for him, but I tried it on multiple devices and I can't see the problem. I am pretty new to web development so I am not sure if I am on the right track.

Looks like it works.
JS and Markup are mostly good.

For CSS, just a couple tiny changes:

Code:
blockquote{
  margin: 50px 50px;
}

Can be simplified to
Code:
blockquote{
  margin: 50px;
}

Explanation... And you might already know this, but maybe some don't:

Code:
margin: 50px

is the same as...

Code:
margin: 50px 50px 50px 50px

which is the same as

Code:
margin: 50px 50px

When working with the shorthand declarations, you can think of it like a clock. The first value is "margin-top," then the next value is "margin-right," then "margin-bottom," then "margin-left." If you have just 1 value, it'll apply to Margin-top first, and then also apply the same value to the rest. If you have 2 values, they'll apply to their opposite sides of the clock (E.g., top applies to bottom; right applies to left)

So:

Code:
margin: 50px 25px;

Will end up being:

Code:
margin: 50px 25px 50px 25px

Which is

margin-top: 50px;
margin-right: 25px;
margin-bottom: 50px /* (this inherits from margin-top if not explicitly provided in the short hand) */
margin-left: 25px /* (this inherits from margin-right if not explicitly provided in the short hand) */


Couple other small changes you should make, like that font-size: 14px followed by font-size: 1rem... Might want to figure out what that's doing.

Good luck.
 

Zakalwe

Banned
Ok, so I'm fully lost here.

Regarding a post I made above: my client wants to display her latest blog post on her site, and it would be great if this could be automatically pulled through every time she updates her blog on Medium.

Medium used to offer an embed feature which would have been perfect, but it seems they removed that. This is a little outside of my current realms of expertise, and while I was given a couple of answers above I feel out of my depth entirely here....

What do I need to learn specifically to be able to do this?
 

this_guy

Member
Ok, so I'm fully lost here.

Regarding a post I made above: my client wants to display her latest blog post on her site, and it would be great if this could be automatically pulled through every time she updates her blog on Medium.

Medium used to offer an embed feature which would have been perfect, but it seems they removed that. This is a little outside of my current realms of expertise, and while I was given a couple of answers above I feel out of my depth entirely here....

What do I need to learn specifically to be able to do this?


Why not just use WordPress or some other blogging software?
 
Ok, so I'm fully lost here.

Regarding a post I made above: my client wants to display her latest blog post on her site, and it would be great if this could be automatically pulled through every time she updates her blog on Medium.

Medium used to offer an embed feature which would have been perfect, but it seems they removed that. This is a little outside of my current realms of expertise, and while I was given a couple of answers above I feel out of my depth entirely here....

What do I need to learn specifically to be able to do this?

Medium has RSS feeds: https://help.medium.com/hc/en-us/articles/214874118-RSS-Feeds-of-publications-and-profiles

You can switch between partial and full excerpts: https://help.medium.com/hc/en-us/ar...rtial-RSS-feeds-for-publications-and-profiles

Harder part might be the actual rendering part, which depends on how the site was build in the first place.

Honestly I would just point the Medium blog into a subdomain / URL (blog.clienthere.com or clienthere.com/blog) and drive readers there from the main page.
 

Kalnos

Banned
Anyone have a good set of HTML/CSS/JS refresher questions or preferably an interactive thing? I'm about to start interviewing again and I have about 4-5 years of professional experience. I'm honestly more afraid of fucking up some fundamentals than anything.
 
Ok, so I'm fully lost here.

Regarding a post I made above: my client wants to display her latest blog post on her site, and it would be great if this could be automatically pulled through every time she updates her blog on Medium.

Medium used to offer an embed feature which would have been perfect, but it seems they removed that. This is a little outside of my current realms of expertise, and while I was given a couple of answers above I feel out of my depth entirely here....

What do I need to learn specifically to be able to do this?

Medium allows you to put ?format=json on the end of any URL to get the json for it.

For instance: https://medium.com/browse/49c2507259ba?format=json

You could then use JS (vanilla JS or jQuery) to iterate through the results, using XHR, and iterating over the results using .each() or a for loop.

Additionally, if the site is built using PHP, Rails, etc., as a backend language, there are ways to do the same using those languages. It would probably be easier to do it with your backend language because it doesn't require you to learn how Asynchronized JS works, which using a front end language sort of would.

Is the site static HTML otherwise?

Why not just use WordPress or some other blogging software?

Medium is blogging software, it's very good too. I could see why the client would prefer to write with Medium, rather than self-hosted (or hosted) WP.
 

Zakalwe

Banned
Medium has RSS feeds: https://help.medium.com/hc/en-us/articles/214874118-RSS-Feeds-of-publications-and-profiles

You can switch between partial and full excerpts: https://help.medium.com/hc/en-us/ar...rtial-RSS-feeds-for-publications-and-profiles

Harder part might be the actual rendering part, which depends on how the site was build in the first place.

Honestly I would just point the Medium blog into a subdomain / URL (blog.clienthere.com or clienthere.com/blog) and drive readers there from the main page.

I looked into this last night, from what I gather you can take the RSS feed, select the specific posts you want, then convert it using JavaScript so it can be read visually on your own site.

I didn't have much time to look. I found a demo for a paid service that seemingly does it for you and spits out some code you embed on your site, but is there a way to do this myself manually?

Heh. Every time I move on to learn something new I feel utterly swamped. I'm sure I'm overlooking something obvious the entire time...

I wish I could just stick to designing in HTML/CSS/JS, but I also really want more skills under my belt.


Medium allows you to put ?format=json on the end of any URL to get the json for it.

For instance: https://medium.com/browse/49c2507259ba?format=json

You could then use JS (vanilla JS or jQuery) to iterate through the results, using XHR, and iterating over the results using .each() or a for loop.

Additionally, if the site is built using PHP, Rails, etc., as a backend language, there are ways to do the same using those languages. It would probably be easier to do it with your backend language because it doesn't require you to learn how Asynchronized JS works, which using a front end language sort of would.

Is the site static HTML otherwise?



Medium is blogging software, it's very good too. I could see why the client would prefer to write with Medium, rather than self-hosted (or hosted) WP.

Yeh, Medium has a lot of support the client is fonfld of. She has no interest in moving.

The site is static HTML/CSS with a little JS. I'm really a novice here, and have mostly focused on the front end design aspects so far.

I've put a couple of months aside for learning. I think I can make sense of your advice enough to guide me in terms of what I need to learn to do this, but any advice (tutorials or specific things I should focus on) regarding what I should be learning would be great.
 
I'm trying my had at making a wordpress plugin, since I can't find one that does eactly what I need.
I made this basic code to display the page titles according to a specific category (on which I hope to iterate further)
Code:
function make_grid(){
	$args = array(
		'category_name' => 'Bandi'
);
	$the_query = new WP_Query( $args );

 if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post();

	echo the_title();
	echo "</br>";

endwhile; else:

echo "<p>Sorry, there are no posts to display</p>";

endif;
}

add_shortcode('grid','make_grid');
The problem is that it only shows 10 titles, when there 6 more in the category. Also somehow the admin dashbar sometimes return a blank page now...hm.
 

Somnid

Member
So I've been working the last couple of weeks to upgrade a code base from angular 1 to angular 2. The sum of my findings: don't do it. Make a new app on the side. Angular 2 is not compatible with a ton of things from angular 1 and the upgrade module is shit and requires a lot of manual work that often forces you to upgrade too much all at once.

Also, not terribly impressed with angular 2. It's certainly cleaner, but it also requires a super heavy build system to get going. A huge amount of extra baggage but it doesn't actually net all that much. Also, I hate fake modules.
 
I'm stuck again, lol. >.<
I'm trying to make it so my shortcodes get formatted properly in html. If I just output html outside the php tag, the output gets printed before anything else in the content, regardless of where I place it.
I read that you should return the html as a string, instead, but for some reason I can't seem to get it right.
Code:
function make_grid(){
	$args = array(
		'category_name' => 'Bandi',
		'posts_per_page' => -1,
);

	$the_query = new WP_Query( $args );
 if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post();

 	$output = '<a class= "il-bando" href="'.the_permalink().'"><div class="grid-item"><span class="span">'.the_title().'</span></div></a>';

endwhile;
else:
return "<p>Sorry, there are no posts to display</p>";
endif;
return $output;

}
add_shortcode('grid','make_grid');
The problem seems to be with the string itself, as only the link and title get printed, before anything else and without formatting, while the div gets printed and formatted, but only once (I know because I gave it a background color).
 
If you're invoking your shortcode in a WordPress template file, even if it's in a region of HTML and not PHP, use do_shortcode() function:

Code:
<?php echo do_shortcode("[name_of_shortcode_here]"); ?>

https://developer.wordpress.org/reference/functions/do_shortcode/

If you're invoking your shortcode within another shortcode or within the same shortcode WordPress has trouble rendering that. This makes creating embeddable-shortcodes (e.g., like an accordion within an accordion, or maybe in your case, a grid within a grid) difficult.

Otherwise at least how your function is written looks fine. If the option above still doesn't work, try declaring your variable as a string first. You can try changing your $output line to two lines and do:

Code:
$output ='';
$output .= '<a class= "il-bando" href="'.the_permalink().'"><div class="grid-item"><span class="span">'.the_title().'</span></div></a>';

That shouldn't change anything, but who knows.

One small HTML point is wrapping your <div> in an <a>. You can do this with HTML5 and it's been common practice for many years now, but you can't with HTML4/transitional and older. That could contribute to your issue if your doctype is set as anything other than HTML5, but I don't think that problem would manifest itself in the way you're describing.

So I've been working the last couple of weeks to upgrade a code base from angular 1 to angular 2. The sum of my findings: don't do it. Make a new app on the side. Angular 2 is not compatible with a ton of things from angular 1 and the upgrade module is shit and requires a lot of manual work that often forces you to upgrade too much all at once.

Also, not terribly impressed with angular 2. It's certainly cleaner, but it also requires a super heavy build system to get going. A huge amount of extra baggage but it doesn't actually net all that much. Also, I hate fake modules.

AYe... I've pretty much abandoned angular when working with new projects. Just not impressed with how complex Angular 2 is to do things that I've found can be radically simplified with React. While React and Angular are not the same, libraries versus frameworks and all, I was using Angular like how I'm using React now, and I'm preferring React for simplicity and a higher data integrity (for me).
 
Top Bottom