Comments (17)
thanks for creating this @techievivek
from creativecommons.github.io-source.
@nik-gautam All the post/page have content stored in content folder, we can use frontend html-stripping and get first 20 words to be part of meta description tag.
When we do html-stripping it will take care and will return us just the text content.
This is not recommended method as there are speculations that FB wont run JS code, so we will have to test it locally first.
from creativecommons.github.io-source.
@kgodey Mam, Please add labels to this issue so that somebody can take it.
from creativecommons.github.io-source.
Can I work on this issue?
from creativecommons.github.io-source.
@nik-gautam go ahead.
from creativecommons.github.io-source.
@techievivek where can I find the latest code with the previous image fixes that you made?
Thanks.
from creativecommons.github.io-source.
@nik-gautam Check here #183
from creativecommons.github.io-source.
@kgodey Can't we use JavaScript here too to add meta description once the DOM content is loaded rather then going for plugins to strip HTML and get excerpt.
It will be easy to implement.
I have gone through some articles on setting meta data using JS, if we can do before the page loads fully there won't be an issue.
We will wait for @nik-gautam if he has any other plans for same.
from creativecommons.github.io-source.
@techievivek could you link the articles you read here?
from creativecommons.github.io-source.
@techievivek I think will be easier to use javascript.
Till now, I have been trying to fix the issue with strip-html-tags
plugin.
A problem that I faced was where to get the info from, because as far I saw there is no common p-tag or any other tag that every page has (which contains the info we want to display), so a common script cannot be ran for all.
Also, my mid-sem exams are going on right now, it will take me a few days to really start coding.
Sorry for the delay.
from creativecommons.github.io-source.
@kgodey Here is one they are doing using Jquery https://stackoverflow.com/questions/9231845/javascript-to-change-metadata-metatags-dynamically
(I have not tested this myself for now). There are some speculations that FB doesn't run JS code. And I have gone through some articles looking for its effect on SEO, but luckily google crawlers can run JavaScript.
Here is from their official developer website:- https://developers.google.com/search/docs/guides/javascript-seo-basics
And here is a report generated by searchengineland team https://searchengineland.com/tested-googlebot-crawls-javascript-heres-learned-220157
from creativecommons.github.io-source.
@nik-gautam @kgodey It might not be possible with JS https://stackoverflow.com/questions/25420887/does-facebook-crawler-currently-interpret-javascript-before-parsing-the-dom
I will try then locally and will confirm by today. Also if this doesn't we will see for alternate with lektor itself.
from creativecommons.github.io-source.
@techievivek js won't work with Facebook crawler...
I did some research, it turns out that fb gets the data by crawling and looking for og meta tags, before loading the DOM. So, any changes via JavaScript on DOM won't work.
Data has to added before generating the static HTML files in lektor.
from creativecommons.github.io-source.
@nik-gautam Yes, I tested it, it's not working. Try doing it with lektor plugins itself.
from creativecommons.github.io-source.
@techievivek @kgodey I have somewhat fixed the issue.
Can you check it before I make a PR?
from creativecommons.github.io-source.
@kgodey @techievivek
Please take a look at this PR.
from creativecommons.github.io-source.
@nik-gautam It's good. If possible please add a screenshot so that it will easy to see the end result. @kgodey will be available after Tuesday till then you can look for other issues.
from creativecommons.github.io-source.
Related Issues (20)
- [Feature] Email field place holder not properly alligned HOT 5
- [RFC] Request for Comments: issues encountered
- [Change] Add `#cc-dev-searchportal` slack channel information to site HOT 1
- [Feature] Improve multi-author support: multiple gravatar images HOT 4
- Avatar image covers the content when inspect is opened HOT 3
- [Bug] some minute grammatical issues HOT 2
- [Bug] Align lists in Get Involved Section on Homepage HOT 6
- [Bug] Responsiveness of the website HOT 8
- Email textbox not optimized for mobile view HOT 15
- [Feature] Add "Other Opportunties" section to Work Programs overview HOT 6
- [Change] The `lektor-google-analytics` needs to be removed, due to its incompatibility with GA4 properties, and lack of updates
- [Bug] The twitter link redirects to the main CC page HOT 9
- Responsive issue in Nav element HOT 16
- Subscribe Button Issue: No Input Validation or Error Feedback HOT 2
- [Bug] Broken Link in the ReadME section HOT 1
- [Bug] The footer has old twitter logo that needs to be updated HOT 11
- [Feature] Recent Posts Design HOT 8
- Inconsistent height of div HOT 4
- Utilize organization default community health files HOT 2
- [Bug] README.md file out of date HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from creativecommons.github.io-source.